C# WinForm DataGridView question

  • Thread starter Thread starter Jason Huang
  • Start date Start date
J

Jason Huang

Hi,

In my C# WinForm application, saying a DataGridView has 3 columns.
What I would like to do is to let the Column3' value equal to Column1 value
X Column2 value.
How do I do that?
Thanks for help.


Jason
 
Jason said:
Hi,

In my C# WinForm application, saying a DataGridView has 3 columns.
What I would like to do is to let the Column3' value equal to Column1 value
X Column2 value.
How do I do that?
Thanks for help.


Jason

I have not used it, but it seems that Virtual Mode with CellValueNeeded
event does the trick. The event occurs when the cell's value is needed
(to be shown), so you can calculate column3 from column1 times column2.
For more, check http://msdn.microsoft.com/en-us/library/ms171622.aspx .
 
Hi,

In my C# WinForm application, saying a DataGridView has 3 columns.
What I would like to do is to let the Column3' value equal to Column1 value
X Column2 value.
How do I do that?
Thanks for help.

I think what you need to look into is the CellValueChanged event.
 
Back
Top