开发者

jQgrid shows 1 of N in the pager when there is no data [Form Editing local Data]

I still have the issue where the pager still shows 1 of NaN inspite of the fact that I have downloaded after selecting the grid.formedit.js. Below the comment containing the list of modules added to jquery.jqGrid.min.js.

Blockquote

/* * jqGrid 3.8.2 - jQuery Grid * Copyright (c) 2008, Tony Tomov, tony@trirand.com * Dual licensed under the MIT and GPL licenses * Date:2010-12-14 * Modules: grid.base.js; jquery.fmatter.js; grid.custom.js; grid.common.js; grid.formedit.js; jquery.searchFilter.js开发者_JAVA技巧; grid.inlinedit.js; grid.celledit.js; jqModal.js; jqDnR.js; grid.subgrid.js; grid.grouping.js; grid.treegrid.js; grid.import.js; JsonXml.js; grid.setcolumns.js; grid.postext.js; grid.tbltogrid.js; grid.jqueryui.js; */

Blockquote

However, in my case it is when editing the data manually.

The script is as follows:

$('#list').jqGrid(
{ 
datatype: "xmlstring", 
datastr: urlParams,
colNames:[
      'Parameter Name',
      'Parameter Value'
      ], 
colModel:[ {name:'pName',index:'pName', width:100,editable:true,editoptions:  {size:25}}, 
       {name:'pValue',index:'pValue',width:100,editable:true,editoptions:{size:25}} 
     ], 
rowNum:10, 
rowList:[10,20,30], 
pager: '#pager', 
sortname: 'pName', 
viewrecords: true, 
sortorder: "desc", 
caption:"URL Parameters", 
editurl:"<%=request.getContextPath()%>/GenerateXMLResponse.do", //dummy URL
height:210 ,
width:420

} ).navGrid('#pager',{edit:true,add:true,del:true});

The datastr is initialized to an empty xml string as follows:

var defURLParams="<?xml version='1.0' encoding='utf-8'?><urlParams/>";

var urlParams =defURLParams;

Any suggestions would be highly appreciated.


Probably you can solve the problem including total in your data. It is not clear in which form you plan include the data in the XML string used in datastr. You should use xmlReader to describe the data (see documentation for more details). The definition could be xmlReader: {root: "urlParams", ...} (to write more one need know the format of your input data).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜