Forum


03:04

18/08/2008

Hi,
i am trying to implement pagination for arraydata.I am able to
get pagination grid but it is not working.
this my code
$(document).ready(function() {
$("#list5").jqGrid({
datatype: "local",
height: 250,
colNames:['Fname','Lname', 'Number'],
colModel:[
{name:'fname',index:'fname', width:60},
{name:'lname',index:'lname', width:90},
{name:'number',index:'number', width:100}],
imgpath: gridimgpath ,
page:1,
pager: $('#pager1'),
rowNum:5,
rowList:[10,20,30],
viewrecords: true,
shrinkToFit: true
}).navGrid('#pager1',{edit:false,add:false,del:false,refresh: true,search: true});
for(var j=0;j<=formData.length;j++) $("#list5").addRowData(j+1,formData[j]);
});
</script>
</head>
<body>
<h2><s:property value="message" /></h2>
<!-- the following table is populated using arrayData -->
<table id="list5" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="pager1" class="scroll" style="text-align:center;"></div>
</body>
please suggest me where i am going wrong.
03:22

Moderators
30/10/2007

Also for local data paging is not suported. This is described in the
documentation
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
74 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66