Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

slickgrid get index of row by it's id

Is there a way to get the index of a row (row-index in the visible grid) by it's ID, which will also work with a sorted/grouped grid?

I am trying to use the function scrollRowIntoView from Slickgrid, which requires the index of the row. Now my problem is that I know the ID of the row, but not which index the row has in the grid. I also use groups which means I cannot search for the row-index in the data.

like image 671
Preli Avatar asked Dec 16 '22 12:12

Preli


1 Answers

You can use dataView.getRowById() to get the index of a filtered grid or you can use dataView.getIdxById() to get the index of the ID from the entire set of data.

like image 144
idbehold Avatar answered Dec 28 '22 23:12

idbehold