I've been working on code to handle when a user selects a cell and then uses the shift/arrow keys to select a range of cells. In the CellKeyPressed event handler in my form, when I do a griddesktop.GetActiveWorksheet().GetLastSelection(), the selected range is from before the shift/arrow key was pressed.
ie Cell A1 has focus. I press shift/Right Arrow. The CellKeyPressed event fires and I call GetLastSelection in the handler. The cellrange returned by GetLastSelection is A1:A1, rather than A1:B1 as I would expect. The control state shows that A1:B1 has been selected.
I'm assuming that the CellKeyPressed event fires before the GetLastSelection state is updated. Is this the expected behavior?