RowId first visible on screen

How can I know the rowId of the first row entirely visible on screen, I can’t find that number in the various objects of the Grid

I need it to return to that same visible rows, so the user doesn’t need to scrool again when he comeback to the grid. After seeing another page that allow make changes.

thanks in advance

Francisco Mariscal

dhtmlxGrid hasn’t inbuild functionality which allow you to save scrolling position automatically. You should do it manually. dhtmlxGrid has method showRow(rowID) which scrolls row to the visible area. Also there is method selectRow(r, fl, preserve, show) which selects row (and first cell of it). Method has parameters:

r - row index or row object, fl - if true, then call function on select, # preserve - preserve previously selected rows true/false (false by default), show - true/false - scroll row to view, true by default.

To get ID of a selected row you ca use method mygrid.getSelectedRowId()