Monday, 12 August 2013

JQGrid subgrid loads only header

JQGrid subgrid loads only header

For the life of me I cannot get JQGrid to load data in a subgrid. What
simple thing am I doing incorrectly?
var myGrid;
var list2 = $('#list2');
myGrid = list2.jqGrid({
url:"/grids/registrations/",
datatype: "xml",
colNames:[
'Location',
'ID',
'Last Name',
'First Name',
'Email',
'Signup Date'],
colModel:[
{name:'Location', index:'locationname'},
{name:'ID', index:'rid'},
{name:'Last Name', index:'LastName'},
{name:'First Name', index:'FirstName'},
{name:'Email', index:'Email'},
{name:'Signup Date', index:'SignupDate'},
],
postData: {startdate: startDate.val(), enddate: endDate.val()},
rowNum: 10,
autowidth: true,
rowList:[10,20,30],
pager: '#pager1',
sortname: 'SignupDate',
viewrecords: true,
sortorder: "desc",
height: "100%",
caption:"Registrations",
subGrid: true,
subGridUrl: "/grids/registrationssubgrid/",
subGridModel: [
{name: ['Client ID'], width : [55]}
]
}).navGrid('#pager1',{edit:false,add:false,del:false,search:false});
My subgrid URL returns this:
<rows><row><cell>100257277</cell></row></rows>
However, the only thing I get is the client ID header without any data.

What am I missing?

No comments:

Post a Comment