|
First, you have set the same field offset for your two members in the struct, which means that they occcupy the same memory area.
Second, you have set the field offset to ten. Why do you think that the structure starts with ten unused bytes?
If you use the fields offsets 0 and 4, it may have a chance to work.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
it doesn't work.please tell me how to solve this problem?
any help appreciated
thanks in advance.
|
|
|
|
|
cristi_alonso wrote: it doesn't work.please tell me how to solve this problem?
With a description as vague as "doesn't work", it's not very easy to offer any guidance... What happens exactly when you try what I suggested?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
hi...
could someone tell me the codes for this scenario..
if i click on the datagridview for example username
if i click that username that username will appear in a label or textbox...
thanks...
|
|
|
|
|
you heard something called CellClick even.
Then just get the value of selected cell and giv it to the Text property of your control(Label, TextBox ...)
And don't ask your question twice!!!
Strahil Shorgov
|
|
|
|
|
sory for asking twice...
i know what your saying but i dont know how to get the value of the selected cell...
can you tell me...
|
|
|
|
|
Try this
tbUserName.Text = gvUsers.SelectedCells[0].Value.ToString();
Strahil Shorgov
|
|
|
|
|
Try the CellEnter event:
void dataGridView_CellEnter(object sender, DataGridViewCellEventArgs e)
{
if (((DataGridView)sender)[e.ColumnIndex, e.RowIndex].Value != System.DBNull.Value)
Textbox.Text = ((DataGridView)sender)[e.ColumnIndex, e.RowIndex].Value.ToString();
}
Kjetil
|
|
|
|
|
hi, I wanna get cell value from my gridview.Ex- I have a column name called "CustName" in my gridview.It has a delete command aslo.After click on "delete" button I have to delete that particular customer from gridview.Before delete that customer i wanna assign that customers name to a "lable".Finally i wanna know how to assign that customer name to that lable.
protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
// Code i need
}
Thankxxxx
CheeN
|
|
|
|
|
This might work for you...
label.Text = GridView2.CurrentRow.Cells["CustName"].Value.ToString();
|
|
|
|
|
how can i get the index of the items in datagrid's current page?
the source of the datagrid is from the datatable, now, i want to get the index of the items(shown of the datagrids current page)in the datatable.
|
|
|
|
|
I am getting the mp3 file properties using shell(ShellClass)...
Folder dir;
dir.GetDetailsOf(item, 19); //returns track number....
like that i am getting artist,album and other details.....
i need to get "Rating" property..... i tried with all index... like dir.GetDetailsOf(item, 20);,dir.GetDetailsOf(item, 21);
but i didnt get Rating informations....how to get it...?
|
|
|
|
|
hi...
could someone tell me the codes for this scenario..
if i click on the datagridview for example username
if i click that username that username will appear in a label or textbox...
thanks...
ginji
modified on Friday, June 20, 2008 3:12 AM
|
|
|
|
|
In the grid's CellClick event you could have code something like...
String sColName = GridView.Columns[e.ColumnIndex].Name;
if (sColName == "username")
TextUser.Text = GridView.CurrentRow.Cells["username"].Value.ToString();
|
|
|
|
|
How to sort array values. but sot\rting parameters are in list<t>.what do do?
for example in below code i want sort the values. what shall i do? shall you help me for this sorting process?
private struct Xsweep
{
public double X;
public double Y;
public int cI;
public int pI;
public int nI;
public int n;
}
List<xsweep> Poly = new List<xsweep>();
List<double> X = new List<double>();
n = Poly.Count - 1;
for (int i = 0; i <= n; i++)
{
if(i < X.Count)
X[i] = Poly[i].X;
else
X.Add(Poly[i].X);
}
Array.Sort(X, Poly);
|
|
|
|
|
some codes are changed there
Poly is list[XSweep]
X is list[double]
|
|
|
|
|
cst_kvp wrote: List Poly = new List();
List X = new List();
n = Poly.Count - 1;
What is this ? You have not added anything to your list poly , how can you iterate the items then ?
|
|
|
|
|
Hi,
Did you look at the built in sortable list types ?
Those who want most to speak up, are often those who have nothing clever to say.
|
|
|
|
|
there is no logic at all in ur code.
First read some books related to arrays and then try to code it.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
In xml file we write "<" as "<";
How to write double quotes "in XML file
|
|
|
|
|
u can write "<" as
" < "
modified on Friday, June 20, 2008 3:33 AM
|
|
|
|
|
" = "
You could use System.Web.HttpUtility.HtmlEncode("anysignyouwant") to get the answer.
Kjetil
|
|
|
|
|
I have a requirement to add dynamically a list box or checkbox to a propertygrid at runtime. I do not know at compile time what type of property items to be added to property Grid.
I am able to achieve to add dynamically a simple property item like a text
by overriding the "PropertyDescriptor" Class in my customdescriptor class.
But how to add in similar way a checkbox or listbox to propertygrid dynamically ?
I was not successfull till now.
But I can achieve the same thing for example adding a checkbox property item at compile time(without overriding PropertyDescriptor) by using UiTypeEditor like:
public class CheckBoxTest : System.Drawing.Design.UITypeEditor
{
public override bool GetPaintValueSupported(ITypeDescriptorContext context)
{
return true;
}
public override void PaintValue(System.Drawing.Design.PaintValueEventArgs e)
{
System.Windows.Forms.ControlPaint.DrawCheckBox(e.Graphics, e.Bounds, ((CustomProperty)e.Context.Instance).checkValue ? ButtonState.Checked : ButtonState.Normal);
}
}
But If I try to achieve the above to be executed at runtime by overriding "PropertyDescriptor" These functions are not called.
Can anyone have any idea ?
Thanks,
Rajan
|
|
|
|
|
How can i access the url of a reporting service?
I have a button, and when you click it, it should get the one report from SSRS.
A help/reply will be much appreciated.
|
|
|
|
|
can some one tell me how to compare textbox value if the same with database value..
textbox1.text == dr1["password"].tostring();
dr1 is datarow..
everytime i run the program even if the value of the are the same it still exits...
for example if textbox1.text = "password" and dr1["password"] value is also "password" the program says there not the same
thanks
ginji
|
|
|
|