Note that there are some explanatory texts on larger screens.

plurals
  1. POJQGRID: Add sort option in the grid for all column
    primarykey
    data
    text
    <p><strong>I need to add sort option in the grid for all column ('Incident key','Date','State','Incident no','FF death', 'OTH death','Property Loss','Cont Loss','Fire Cause') separately. I tried but its not working, please do fix sorting in my code and answer if you have some idea on it.</strong> </p> <pre><code> showLoading(); $("#list1").jqGrid({ type: 'POST', url: 'include/LocationService.php?run=gridForCongressionalDistrict&amp;address='+$('#address').val()+'&amp;radius='+$('#radius').val()+'&amp;query='+encodeURIComponent(query_condition), datatype: 'json', colNames:['Incident key','Date','State','Incident no','FF death', 'OTH death','Property Loss','Cont Loss','Fire Cause'], colModel :[ { name:'a.INC_KEY', index:'a.INC_KEY', width: 220, hidden: true, editrules: { edithidden:true }, searchoptions: { sopt: ['eq', 'ne','cn'] } }, { name:'a.INC_DATE', index:'a.INC_DATE', width: 100, searchoptions: { sopt: ['eq', 'ne','cn'] } }, { name:'a.INC_NO', index:'a.INC_NO', width: 100, searchoptions: { sopt: ['eq', 'ne','cn'] } }, { name:'a.STATE', index:'a.STATE', width: 100, searchoptions: { sopt: ['eq', 'ne','cn'] } }, { name:'a.FF_DEATH', index:'a.FF_DEATH', width: 80, searchoptions: { sopt: ['eq', 'ne','cn'] } }, { name:'a.OTH_DEATH', index:'a.OTH_DEATH', width:80, searchoptions: { sopt: ['eq', 'ne','cn'] } }, { name:'a.PROP_LOSS', index:'a.PROP_LOSS', width: 80, searchoptions: { sopt: ['eq', 'ne','cn'] } }, { name:'a.CONT_LOSS', index:'a.CONT_LOSS', width: 80, searchoptions: { sopt: ['eq', 'ne','cn'] } }, { name:'a.CAUSE_CODE_DESC', index:'a.CAUSE_CODE_DESC', width: 240, searchoptions: { sopt: ['eq', 'ne','cn'] } }, ], pager: '#pager', rowNum: 500, rowList:[500,100,20], sortname: 'INC_KEY', sortorder: 'desc', viewrecords: true, height: 400, width: 800, shrinkToFit: false, gridview: true, caption: 'Reports', loadComplete: function(data){ console.log('load complete'); pin_data = data; viewReset = 'true'; onSuccessFunction(data,'true'); } }); jQuery("#list1").jqGrid('navGrid','#pager',{ edit:false, add:false, del:false }); jQuery("#list1").jqGrid("clearGridData", true).setGridParam({ url : 'include/LocationService.php?run=gridForCongressionalDistrict&amp;address='+$('#address').val()+'&amp;radius='+$('#radius').val()+'&amp;query'+encodeURIComponent(query_condition), loadComplete: function(data){ console.log('load complete'); onSuccessFunction(data, 'true'); } }).trigger("reloadGrid") $("#error").html('&lt;div class="error1"&gt;&lt;/div&gt;'); } } ) }) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload