I finally found grid.selModel.bufferedSelections() to get the array of selected row indexes. Is this the best way to do it?