This is my table generation codefor jqGrid 3.5.2
var jsonData = [{"KEY.ServiceId":"Service ID","KEY.ServiceDefinition":"Service Definition","KEY.Upload":"Upload","KEY.Download":"Download"}];
$('#' + id + 'Grid').jqGrid({
datatype: 'json',
rows : jsonData ,
colNames: [ 'KEY.ServiceId',
'KEY.ServiceDefinition',
'KEY.Upload ',
'KEY.Download'
],
colModel: [
{ name: 'KEY.ServiceId', index: 'KEY.ServiceId', width: 135, sortable: false },
{ name: 'KEY.ServiceDefinition', index: 'KEY.ServiceDefinition', width: 175, sortable: false },
{ name: 'KEY.Upload', index: 'KEY.Upload', width: 110, sortable: false },
{ name: 'KEY.Download', index: 'KEY.Download', width: 110, sortable: false }
],
height: '100',
scrollOffset: 0,
loadComplete: function(loadData) {
if (loadData == null || loadData.rows == null || loadData.rows.length == null || loadData.rows.length <= 5) {
$('#' + id + 'Grid').setGridHeight("auto");
}
},
jsonReader: {
repeatitems: false
},
loadui: 'disable',
altRows: true,
viewrecords: true,
loadonce: true,
caption: 'My Caption'
});
However when I run it I do not get any error and table is empty.
EDIT: I have fixed my code and created a working fiddle example at here: http://jsfiddle.net/yNw3C/9668/ However it does not work with jqGrid 3.5.2?