W
Wayne Gibson
Hi,
Was wonderingif anyone could help with the following problem..
I have a datagrid that I am populating from a datatable. The grid has a
number of columns, one of which is an DataGridViewTextBox Column. There
isn't a way to pick up when this column is updated.
So I'm using the CellBeginEdit and CellEndEdit events, to pick when a change
has been made. Now if the value in the text box
has changed, I need to refresh the DataGridView.
Which I'm doing by querying the database, then attaching the datatable to
the DataGridView.datasource. Now this works fine if :
1) The user is navigating around the DataGridView
2) The user clicks on another cell that doesn't have any controls in the
columns.
But if the user clicks on the another textbox in the same column, it throws
up an exception:
An unhandled exception of type 'System.InvalidOperationException' occurred
in System.Windows.Forms.dll
Additional information: Operation is not valid because it results in a
reentrant call to the SetCurrentCellAddressCore function.
Was wondering if anybody had an ideas on this?
Or if they could suggest a better way of refreshing the datasource outside
of CellEndEdit.
Thanks
Was wonderingif anyone could help with the following problem..
I have a datagrid that I am populating from a datatable. The grid has a
number of columns, one of which is an DataGridViewTextBox Column. There
isn't a way to pick up when this column is updated.
So I'm using the CellBeginEdit and CellEndEdit events, to pick when a change
has been made. Now if the value in the text box
has changed, I need to refresh the DataGridView.
Which I'm doing by querying the database, then attaching the datatable to
the DataGridView.datasource. Now this works fine if :
1) The user is navigating around the DataGridView
2) The user clicks on another cell that doesn't have any controls in the
columns.
But if the user clicks on the another textbox in the same column, it throws
up an exception:
An unhandled exception of type 'System.InvalidOperationException' occurred
in System.Windows.Forms.dll
Additional information: Operation is not valid because it results in a
reentrant call to the SetCurrentCellAddressCore function.
Was wondering if anybody had an ideas on this?
Or if they could suggest a better way of refreshing the datasource outside
of CellEndEdit.
Thanks