Forum


07:32

16/03/2010

Unable to get the paging to work. Always stuck on page. I've searched the forums, and can't see what's wrong with the code. Any help would be greatly appreciated!
Here is my code:
jQuery("#list").jqGrid({
url: '../projects/paged2/',
datatype: "json",
height: 150,
width: 600,
colNames: ['Project ID', 'Name', 'Category'],
colModel: [
{ name: 'item_id', index: 'item_id', width: 100 },
{ name: 'name', index: 'name', width: 150 },
{ name: 'category', index: 'category', width: 100 }
],
rowNum: 10,
mtype: "GET",
rownumbers: false,
rownumWidth: 40,
gridview: true,
sortname: 'name',
sortorder: "desc",
viewrecords: true,
pager: '#pager',
sortorder: "asc",
rowList: [10, 25, 50],
caption: "Loading data while scrolling"
});
JSON returned:
{"page":"1","total":"1","records":"57","rows":[{"id":"2308","cell":["2308","Project","3/10/2010 11:36:47 AM"]},{"id":"2309","cell":["2309","Project","3/10/2010 1:02:26 PM"]},{"id":"2313","cell":["2313","Project","3/10/2010 2:46:10 PM"]},{"id":"2315","cell":["2315","Project","3/10/2010 3:00:12 PM"]},{"id":"2316","cell":["2316","Site A 5mi","3/10/2010 3:02:20 PM"]},{"id":"2317","cell":["2317","2 areas","3/10/2010 5:26:49 PM"]},{"id":"2319","cell":["2319","Project 1.5 mile","3/10/2010 5:52:41 PM"]},{"id":"2323","cell":["2323","Project","3/11/2010 2:03:25 PM"]},{"id":"2327","cell":["2327","Project","3/12/2010 1:45:04 AM"]},{"id":"2328","cell":["2328","Project","3/12/2010 10:39:42 AM"]}]}
21:19

Moderators
30/10/2007

Hello,
Check your server side code
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:
37 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