Sorting issue in jqgrid
<p>the below code code is not sorting but pagination is working.Any solution?</p>

<pre>
$("#vendor_list").jqGrid({
        url: '/ra/vendor',
        datatype: 'json',
        ignoreCase: true,
        colNames:['Vendor ID','Vendor Code', 'Vendor Name', 'Country', 'Approved', 'Location'],
        colModel:[
                  {name:'Vendor ID',index:'vendor_id', hidden:true},
                  {name:'Vendor Code',index:'vendor_code', sorttype: 'text'},
                  {name:'Vendor Name',index:'vendor_name', sorttype: 'text'},
                  {name:'Country',index:'country', sorttype: 'text'},
                  {name:'Preferred',index:'preferred', align:'center'},
                  {name:'Location',index:'location_flag', align:'center'},
                 ],
        rowNum:5,
        rowList:[5,10,20,30],
        sortable: true,
        loadonce: true,
        mtype: "POST",
        pager: $('#vendor_list_pager'),
        sortname: 'id',
        sortorder: 'asc',
        multiselect: true,
        viewrecords: true,
        gridview: true,
        //onPaging: function(which_button) {
        //  $('#vendor_list').setGridParam({datatype: 'json'});
        //},
        caption:"Vendor Selection List",
});
</pre>
