Jump to content
Xtreme .Net Talk

can a datagrid cell display one thing but have a different value, like a list box?


Recommended Posts

Posted

in a list box you can have a selected item, and a selected value. the items are shown in the list box and when you select one you can use the underlying selected value.

eg.

 

select "jimmy" in the list box, and the selected value property might be something like "cust_03".

 

is this possible with cells in a datagrid?

Posted
in a list box you can have a selected item, and a selected value. the items are shown in the list box and when you select one you can use the underlying selected value.

eg.

 

select "jimmy" in the list box, and the selected value property might be something like "cust_03".

 

is this possible with cells in a datagrid?

 

 

if you are using a dataset you can get access to the original and current value using:

 

System.Data.DataRowVersion.Current

System.Data.DataRowVersion.Original

 

			MessageBox.Show("CurrentValue: " + dataSet11.Tables[0].Rows[dataGrid1.CurrentRowIndex][dataGrid1.CurrentCell.ColumnNumber,System.Data.DataRowVersion.Current].ToString());
		MessageBox.Show("OriginalValue: " + dataSet11.Tables[0].Rows[dataGrid1.CurrentRowIndex][dataGrid1.CurrentCell.ColumnNumber,System.Data.DataRowVersion.Original].ToString());

 

I hope this helps,

kmg

You're either a one or a zero. Alive or dead.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...