jqgrid won't sort
Posted
by Ohana
on Stack Overflow
See other posts from Stack Overflow
or by Ohana
Published on 2010-03-16T22:04:50Z
Indexed on
2010/03/17
21:11 UTC
Read the original article
Hit count: 624
jqgrid
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});
© Stack Overflow or respective owner