jqgrid won't sort
- by Ohana
hi, i have a jqgrid to display data, however it won't sort, i followed the examples provided by jqgrid, did i miss anything?
jQuery("#list-table").jqGrid({
url:'data/getJSONFile.php?set='+setName+'&list='+listName,
datatype: "json",
colNames:['id', 'title','author','publisher'],
colModel:[
{name:'id',index:'id',width:55, sortable:true},
{name:'title',index:'title',width:150,sorttype:'string'},
{name:'author',index:'author', width:150},
{name:'publisher', index:'publisher', width:200}
],
rowNum:10,
//autowidth:true,
width: 800,
rowList:[10,20,30],
pager:jQuery('#pager1'),
sortname:'id',
viewrecords: true,
sortorder: "desc",
caption:"books list"
});
jQuery("#list-table").jqGrid('navGrid', '#pager1',{edit:false, add:false,del:false});