Forum


13:03

12/02/2010

Greetings,
The json/ouput from my url 'list' is something like this:
{"page":"2","records":"50","rows":[{"id":"1"},[{"total":"cell1","note":"cell2"}]],"total":"10"}
and the following grid definition on my html file, but I can only see the grid without data inside on it's row, what do I miss? I've been re-reading the wiki and docs.Thanks in advance.
jQuery(document).ready(function(){
jQuery("#list2").jqGrid({
url:'/list',
datatype: "json",
colNames:['Inv No','Total','Notes'],
colModel:[ {name:'id',index:'id', width:55},
{name:'total',index:'total', width:80,align:"right"},
{name:'note',index:'note', width:150, sortable:false} ],
rowNum:10,
rowList:[10,20,30],
pager: '#pager2',
sortname: 'id',
viewrecords: true,
sortorder: "desc",
root: "rows",
cell: "",
id: "0",
caption:"" });
jQuery("#list2").jqGrid('navGrid','#pager2',{edit:false,add:false,del:false});
});
</script>
regards,
lupin
13:29

03/02/2010

14:51

Moderators
30/10/2007

Hello,
You should configure your jsonReader for this purpose. In order to work this a repeatitems should be set to false
http://www.trirand.com/jqgridw.....#json_data
Regards
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:
72 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