Hi I have a dategrid on my form and I can't edit any cell in the datagrid could any one help me out.
thanks
Printable View
Hi I have a dategrid on my form and I can't edit any cell in the datagrid could any one help me out.
thanks
Is it a bound grid?
How is it populated?
Yes it is bond to a dataset and it is populated upon selecting somethngfrom a combobox which selectedvalue is the value to the command value.Quote:
Originally Posted by petevick
http://msdn.microsoft.com/en-us/library/ms180748.aspx should help for VS2008, or for VS2005 you can provide a invisble control for data entry (TextBox, ComboBox, etc) and then handle the "DoubleClick" event for the DataGrid. In that handler, use the DataGrid.CurrentCell to determine your current cell. Then, set the bounds of your TextBox (or other control) to DataGrid.GetCellBounds. Finally, you can copy the contents of the cell to your TextBox, Select it, make it visible, and edit away - does that help?
Thanks very much