Javascript loadonce设置为true时分页不起作用
我有大约50条记录,我希望在jqgrid中每页只显示10行。如果我设置rowNum:10,它将只显示10条loadOnce:true的记录。我希望实现客户端列搜索,因此我使用了loadOnce属性。我知道,使用loadOnce:true,只能获取rowNum属性中指定的记录数 多谢各位Javascript loadonce设置为true时分页不起作用,javascript,java,jquery,jsp,free-jqgrid,Javascript,Java,Jquery,Jsp,Free Jqgrid,我有大约50条记录,我希望在jqgrid中每页只显示10行。如果我设置rowNum:10,它将只显示10条loadOnce:true的记录。我希望实现客户端列搜索,因此我使用了loadOnce属性。我知道,使用loadOnce:true,只能获取rowNum属性中指定的记录数 多谢各位 $("#grid").jqGrid({ url:"<%=url%>ObjectController?module="+module+"&levelId="+levelId+"&s
$("#grid").jqGrid({
url:"<%=url%>ObjectController?module="+module+"&levelId="+levelId+"&subLevelId="+subLevelId+"&subSubLevelId="+subSubLevelId+"&docRefNo="+docRefNo+"&divisionId="+divisionId+"&deptId="+deptId+"&viewDocStatus="+viewDocStatus+"&docStatus="+docStatus+"&queryString="+queryString+"&qString="+qString+"&V="+plantId+"&searchString="+searchString,
datatype: "json",
rowNum:10,
rowList : PAGINATIONPAGESIZES,
paging: true,
autowidth: true,
altRows:false,
rownumbers: true,
multiselect: true,
shrinkToFit: false,
viewrecords: true,
loadonce:true,
ignoreCase:true,
multiboxonly: false,
loadComplete : function () {
jQuery("#grid").setGridParam({rowNum:10}).trigger("reloadGrid");
},
beforeSelectRow: handleMultiSelect,
<% if(workFlowCreatorRoleList != null
&& workFlowCreatorRoleList.size() >0
&& workFlowCreatorRoleList.contains(Integer.valueOf(roleId))
|| (session.getAttribute("employeeRoleId")!=null
&& session.getAttribute("employeeRoleId").toString().equalsIgnoreCase(com.sobis.ims.util.ApplicationConstants.GLOBAL_ADMIN_ROLE))) { %>
colNames: ["","docId","","I","","","R","Document No","Title","Issue No","Rev No","Issue Effective Date","","","",""],
<% } else { %>
colNames: ["","docId","","Document No","Title","Issue No","Rev No","Issue Effective Date","","","",""],
<% } %>
colModel: [{
name: 'viewURL',
search:true,
hidden:true,
width:0,
fontsize:'5px',
resizable: true,
title :false,
classes:"grid-col",
},{
$(“#网格”).jqGrid({
url:“ObjectController?module=“+module+”&levelId=“+levelId+”&subLevelId=“+subLevelId+”&subLevelId=“+subLevelId+”&docRefNo=“+docRefNo+”&divisionId=“+divisionId+”&deptId=“+deptId+”&viewDocStatus=“+viewDocStatus+”&queryString=“+queryString+”&qString=“+queryString+”&V=“+plantId+”&searchString=“+searchString,
数据类型:“json”,
rowNum:10,
行列表:分页页面大小,
是的,
自动宽度:正确,
奥尔特罗斯:错,
行数:对,
多选:对,
shrinkToFit:错,
viewrecords:是的,
有一次:是的,
ignoreCase:是的,
multiboxonly:错误,
loadComplete:函数(){
jQuery(“#grid”).setGridParam({rowNum:10}).trigger(“reloadGrid”);
},
beforeSelectRow:handleMultiSelect,
0
&&workFlowCreatorRoleList.contains(Integer.valueOf(roleId))
||(session.getAttribute(“employeeRoleId”)!=null
&&session.getAttribute(“employeeRoleId”).toString().equalsIgnoreCase(com.sobis.ims.util.ApplicationConstants.GLOBAL_ADMIN_ROLE)){%>
colNames:[“”、“docId”、“”、“I”、“”、“”、“R”、“文件号”、“标题”、“发行号”、“版次号”、“发行生效日期”、“”、“”、“”、“”、“”、“”、“”、“”,
ColName:[“”、“文件ID”、“”、“文件号”、“标题”、“发行号”、“版次号”、“发行生效日期”、“”、“”、“”、“”、“”],
colModel:[{
名称:'viewURL',
搜索:对,
隐藏:是的,
宽度:0,
字体大小:'5px',
可调整大小:正确,
标题:假,
类:“网格列”,
},{
rowNum参数显示指定的记录数,而loadonce加载所有数据。例如,如果您的响应有50条rowNum=10的记录,并且loadonce设置为true,则所有50条记录都在本地加载,但在网格中仅显示前10条。如果您设置为使用寻呼机,则可以使用它查看剩余的记录奥兹
我强烈建议您根据所使用的jqGrid版本阅读文档-Guriddo jqGrid或免费jqGrid