Hi!
Hope you are having a lovely summer.
I have created a small demo application (attached) to illustrate what happens.
Here's a grid with 15 rows:
Image1.jpg 18.23KB 2 downloads
Case 1) Pressing button "New" clears the content of the grid, but the cell remains focused and active after ClearRows.
Image2.jpg 10.91KB 0 downloads
Case 2) Pressing button "Load" clears the grid and then loads a file. Just like before, the cell is still active and In addition if the loaded grid has fewer rows none of them can be focused.
Image3.jpg 14.38KB 0 downloads
Writing this far I realise the problem only seems to happen while a cell is being edited, so I tried calling EndEditing() before ClearRows() and that helps. As a previous workarund I did: