gpt4 book ai didi

javascript - jqGrid v4.0 使用本地数据类型时分页器不工作

转载 作者:行者123 更新时间:2023-12-02 20:18:06 25 4
gpt4 key购买 nike

我使用 jqGrid v4 来显示一些本地数据。我尝试遵循简单的示例@ http://www.ok-soft-gmbh.com/jqGrid/SimpleLocalGrid.htm 。我的结果是寻呼机元素是正确的,但它们被禁用。如果有人可以帮助指出我可能出错的地方,我已附上我的代码。任何帮助表示赞赏。谢谢

  var myData = [
{ id:'1', name:'a', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'2', name:'b', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'3', name:'c', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'4', name:'d', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'5', name:'e', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'6', name:'f', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'7', name:'g', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'8', name:'h', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'9', name:'i', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'10', name:'j', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'11', name:'k', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'12', name:'l', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'13', name:'m', dob:'2000-08-26',address:'here',telNo:'2587456'},
{ id:'14', name:'n', dob:'2000-08-26',address:'here',telNo:'2587456'}
];
$("#resultGrid").jqGrid({
datatype: "local",
data: myData,
autowidth:true,
colNames:['ID','Name', 'DOB', 'Address','Telephone Number'],
colModel:[
{name:'id',index:'id', sorttype:"text"},
{name:'name',index:'name', sorttype:"text"},
{name:'dob',index:'dob', sorttype:"date", formatter:"date"},
{name:'address',index:'address', sorttype:"text"},
{name:'telNo',index:'telNo', align:"right",sortable:false}
],
rowNum:10,
rowList:[5,10,20],
pager: '#pager',
gridview:true,
rownumbers:true,
viewrecords: true,
sortorder: 'desc',
caption:'Search Results',
height: '100%'});

最佳答案

抱歉,我无法重现您的问题。如何查看 here寻呼机(转到下一页或最后一页)未停用。您应该将您的代码与我的演示进行精确比较,以找出问题所在。

关于javascript - jqGrid v4.0 使用本地数据类型时分页器不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5951337/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com