E
elziko
I have a DataTable bound to a DataGrid. When a user clicks on a row on the
DataGrid I use:
MyDataTable.Rows(MyDatagrid.CurrentRowIndex).Item(0)
to do some work with the value in the first cell for the currently selected
row. However, when I delete a row (using the delete key oin the grid) and
try and do the above on the row that has now taken the deleed roe's position
in the grid I get the following exception:
An unhandled exception of type 'System.Data.DeletedRowInaccessibleException'
occurred in system.data.dll
Additional information: Deleted row information cannot be accessed through
the row.
I also note that the Rows.Count of the data table remains the same even
after I have used the delete key to delete a row. I think they must be
connected issues. Any ideas on what I should do?
DataGrid I use:
MyDataTable.Rows(MyDatagrid.CurrentRowIndex).Item(0)
to do some work with the value in the first cell for the currently selected
row. However, when I delete a row (using the delete key oin the grid) and
try and do the above on the row that has now taken the deleed roe's position
in the grid I get the following exception:
An unhandled exception of type 'System.Data.DeletedRowInaccessibleException'
occurred in system.data.dll
Additional information: Deleted row information cannot be accessed through
the row.
I also note that the Rows.Count of the data table remains the same even
after I have used the delete key to delete a row. I think they must be
connected issues. Any ideas on what I should do?