Menu access to row/cell index info.

I am creating a menu to access the grid.
Is there a way to:

  1. quickly determine the last row number?
  2. capture the current selected cell row/column.

and pass that info to my menu tool?

thanks, Dustin

  1. quickly determine the last row number?
    You may get the total number of rows with the getRowsNum() method:
    docs.dhtmlx.com/api__dhtmlxgrid_getrowsnum.html
    the index of the last row in the grid will be:
    last_row_ind=grid.getRowsNum() - 1
    You can get the id of that row using the getRowId() method:
    docs.dhtmlx.com/api__dhtmlxgrid_getrowid.html

  2. capture the current selected cell row/column.
    You may use the getSelectedRowId() method
    docs.dhtmlx.com/api__dhtmlxgrid_ … rowid.html