当前位置: 动力学知识库 > 问答 > 编程问答 >

jquery - The method "clearGridData" does not clear the paging toolbar

问题描述:

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":

update

change "paging toolbar" by "Navigation layer"

网友答案:

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

网友答案:

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);

分享给朋友:
您可能感兴趣的文章:
随机阅读: