When I change a value programatically in a DataTable that my DataGridView is bound to, the appropriate CellValueChanged event is not firing for the DataGridView. I\'m trying to
You are changing the DataTable
directly and expect DataGridView
's event to be fired?
I suggest that you change the cell value programatically as:
DataGridView[ColumnIndex, RowIndex].Value = NewValue;
Additionally you will have to Call DataGridView.CommitEdit()
to commit the values to the DataTable
. This should trigger the CellValueChanged
event.
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellvaluechanged.aspx