Wednesday, 21 August 2013

DataGridView.BeginEdit called but underlying DataRowView on new row is null

DataGridView.BeginEdit called but underlying DataRowView on new row is null

My DataGridView is bound to a DataTable.
I'm forcing a DataGridView cell into edit mode upon a certain key
combination and if I check the IsInEditMode property of the cell it
returns true. The issue I'm having is that the DataBoundItem is Null for
new rows.
Is there anyway I can force the same behaviour that you get when you start
typing into a cell on a new row i.e. a new DataRowView is created and
assigned to the DataBoundItem of the new row?
thanks
Matt

No comments:

Post a Comment