DHTMLX Docs & Samples Explorer

Index
dhtmlxgrid
API Methods

### selectRow(rIndex, fl, preserve, show)

Required library edition:
Required library file: dhtmlxgrid.js

selects row (and first cell of it)

- rIndex - row index or row object
- fl - if true, then call function on select (optional, false by default)
- preserve - preserve previously selected rows true/false (false by default). Multi select mode should be enabled.
- show - true/false - scroll row to view, true by defaul

       //select first row in grid
       mygrid.selectRow(0);
       //select first row in grid, call "onRowSelect" function, preserve previously selected rows, scroll row to view
       mygrid.selectRow(0,true,true,true);

Please make sure that necesary row is loaded before calling this method.

See also: selectCell, selectAll, showRow, selectRowById