Forum


11:29

16/05/2009

Hello!
I love jqGrid. It kicks the pants off of every other jQuery based grid solution. I am using it in my application and I would like to know if it's possible to have more than one pager. Ideally, I'd like a pager at the top and bottom of the grid. I'm using the most current beta from github (LOVE the integration with ui theming) and I can't seem to make it happen. Is this possible? I've tried changing the DOM selector for the grid's pager attribute to a class selector which hits both my divs, but I continue to just get one pager at the bottom.
Strangely, even when I place the pager at the above the grid in my HTML markup, it still shows up at the bottom. Is this second issue perhaps a side effect of the new beta using the jQuery UI theming?
The grid always shows up and works, but with only one pager at the bottom
HTML:
jQuery(document).ready(function(){
jQuery(”#list”).jqGrid({
url:'ajaxtest.cfm',
datatype: 'json',
mtype: 'post',
colNames:['ID','User Name','Email','First Name','Last Name'],
colModel :[
{ index: 'id', hide: 'true', name: 'id', },
{ index: 'username', name: 'username', searchable: 'true', },
{ index: 'emailaddr', name: 'emailaddr', searchable: 'true', },
{ index: 'firstname', name: 'firstname', searchable: 'true', },
{ index: 'lastname', name: 'lastname', searchable: 'true', }
],
pager: jQuery('.pager_list'),
rowNum:10,
rowList:[10,20,30],
sortname: 'id',
sortorder: “desc”,
viewrecords: true,
caption: 'My first grid',
});
});
</script>
<div id=”pager_list_top” class=”pager_list scroll” style=”text-align:center;”></div>
<table id=”list” class=”scroll”></table>
<div id=”pager_list_bottom” class=”pager_list scroll” style=”text-align:center;”></div>
Thanks!
-Mike L.
12:14

Moderators
30/10/2007

Hello Mike,
Thanks. Currently it is not possible to have 2 pagers on the same grid.
To make long story short, when I develop the 3.5 version this was one of the first thing that I want to do, but... as always I should save the previous users not to change thier code hard.
Instead I'm thinking on new method paggingToolbar.
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:
175 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