I have two problems concerning DataGrid.
First goes like this: i fill a the grid through a table; suppose the table has 3 cols x 4 rows; i click the grid on the third col, forth row; then i move the focus on another control and i clear the table. Next time the grid receives the focus, a "Index was outside the bounds of the array." error message.
Inspecting the CurrentCell property of the DataGrid, you will see that it is the same when the grid had last time the focus. In our case (3,4); but since the grid has no rows... I have tried setting the CurrentCell manually to (0, 0), but still the same message.
The second goes like this:
I have a DataGrid filled through a DataTable; i enter the grid to edit some values; while i'm still editing the values, i move the focus to another control and clear the underlying DataTable. At this moment, a "Object reference not set to an instance of an object." error appears.
Thanks in advance for any reply !