1. Get the current list of rows: $ ("#gridid"). Getgridparam ("RecCount");
2. Get the selected row data (JSON): $ ("#gridid"). Jqgrid (' getRowData ', id);
3. Refresh the list: $ (refreshselector). Jqgrid (' Setgridparam ', {url: '), PostData: '}). Trigger (' Reloadgrid ');
4. Select the line: $ ("#jqGrid"). SetSelection ("1", true); (Toggles a selection of the row with ID =rowid; Ifonselectrowis true (the default) then the event Onselectrow is launched, otherwise it's not.)//true: Reload tabular data, false: do not re- Loading Tabular data
5. Reset the selected line: $ ("#jqgrid"). Resetselection (); Resets (unselects) the selected row (s). Also works in MultiSelect mode.
6. Clear: $ ("#jqgrid"). Cleargriddata (); Clears the currently loaded data from grid. If the Clearfooter parameter is set to True, the method clears the data placed on the footer row.
7.$ ("#jqgrid"). Setcell (ROWID,COLNAME,NDATA,CSSP,ATTRP);
This method can change the content of particular cell and can set class or style properties. Where:
rowidthe ID of the row,
Colnamethe Name of the column (this parameter can is a number (the index of the column) beginning from 0
Datathe content that can is put into the cell. If empty string The content won't be changed
Classif class is string and we add a class to the cell using AddClass; If class is an array we set the new CSS properties via CSS
Propertiessets the attribute properies of the cell,
Forceupif The parameter is set to True we perform update of the cell instead, the value is empty
8. Get the selected Row ID
var rowID = $ ("#jqgrid"). Jqgrid (' Getgridparam ', ' selrow ');
var rowID = $ ("#searchResultList"). Getgridparam ("Selrow");
var RowData = $ ("#searchResultList"). GetRowData (ROWID); /based on row ID, gets the data of the selected row (based on)