14 Replies Latest reply on Nov 8, 2011 2:39 PM by Murshed1992

    How do I get the indices of multiple selected rows in a dataGrid?

    Murshed1992 Level 1

      If multiple rows are selected in a datagrid, how can I get the index of the first and last index selected?


      myDataGrid.selectedIndex only contains the index of the first of the selected rows (for example, 4). How can I get the one that is at the end of the selection (for example, 20)? If I can't get the actual last row index, I would also be happy with something that gives me the length of the selection so that the lastRow# = firstRow# + lengthOfSelection.


      I think I tried selectedIndices but that wasn't very helpful. Maybe I used it wrong.


      I'd appreciate any help.