Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The method "clearGridData" does not clear the paging toolbar

Tags:

jquery

jqgrid

I'm using the method "clearGridData" of "jqGrid 3.8 " to clear all data, but not clearing the "Navigation layer".

$("#MyGrid").jqGrid("clearGridData", true);

Thoroughly clean the grid, but leaves the "Navigation layer":

alt text

update

change "paging toolbar" by "Navigation layer"

like image 861
andres descalzo Avatar asked Jan 11 '11 20:01

andres descalzo


2 Answers

Use $("#MyGrid").jqGrid("clearGridData", true).trigger("reloadGrid");

like image 183
Cesar Avatar answered Nov 17 '22 09:11

Cesar


The rowNum parameter is not the part of data sent to the server or filled manually. If you show the empty grid having no data the user are able to switch the value of rowNum any time.

If you need to reset the rowNum parameter you can use

$("#MyGrid").jqGrid('setGridParam', {rowNum:10});

together with the call $("#MyGrid").jqGrid("clearGridData", true);

like image 31
Oleg Avatar answered Nov 17 '22 09:11

Oleg