It sounds like getting selected cells in the grid is actually more complicated than I thought. Fortunately, someone has already written up some code explaining it all here:
There are 3 ways of selecting cells in a grid, so there are 3 different ways of acquiring the selection.