title: jqGrid - sort not working
body: <pre><code>    $("#grid").jqGrid({
          datatype: 'local',
          mtype: 'GET',
          loadui: 'block',
          altRows: true,
          altclass: "myAltRow",
          multiselect: false,
          recordpos: "right",
          pagerpos: "center",
          pager: $('#gridt_summarypager'),
          pginput: false,
          rowNum: 100,
          recordtext: "Showing {0} - {1} of {2}",
          viewrecords: true,
          sortname: 'Project',
          sortorder: 'asc',
          colNames: ['ProjectID', '&lt;%: Project %&gt;', '&lt;%: ProjectTitle %&gt;' , 'ProjectItemID', '&lt;%: usProjectItem %&gt;', 'Hours To Authorise', 'Hours Not Posted', 'Hours Rejected', 'Last 12 Months'],
          colModel: [
        { name: 'ProjectID', index: 'ProjectID', width: 0, hidden: true},
        { name: 'Project', index: 'Project', width: 90, align: 'left', formatter: htmlEncodedString },
        { name: 'ProjectTitle', index: 'ProjectTitle', width: 90, align: 'left', formatter: htmlEncodedString },
        { name: 'ProjectItemID', index: 'ProjectItemID', width: 0, hidden:true },
        { name: 'ProjectItem', index: 'ProjectItem', width: 100, align: 'left', formatter: htmlEncodedString },
        { name: 'HoursToAuthorise', index: 'HoursToAuthorise', width: 125, align: 'right', formatter: timesheetsProjectToAuthoriseQueryFormat },
        { name: 'HoursNotPosted', index: 'HoursNotPosted', width: 125, align: 'right', formatter: timesheetsProjectUnpostedQueryFormat&lt;% if (!(bool)ViewData["PostingEnabled"]) { %&gt;, hidden: true &lt;% } %&gt; },
        { name: 'HoursRejected', index: 'HoursRejected', width: 125, align: 'right', formatter: timesheetsProjectRejectedQueryFormat },
        { name: 'HoursSubmitted12Months', index: 'HoursSubmitted12Months', width: 125, align: 'right', formatter: timesheetsProjectYearQueryFormat }],
          imgpath: '../../Scripts/css/ui-lightness/images',
          height: 145,
          shrinkToFit: false,
          hoverrows: false,
          loadError: function (xhr, st, err) {
              if (xhr.status == 200) {
                  window.location = '&lt;%= loginPage %&gt;';
              }
              else if (xhr.status == 500) {
                  $('#grid_summary_errors').html(xhr.statusText);
              }
          },
          beforeSelectRow: function(rowid, e) {
              /* disable row selection */
              return false;
          },
          onSortCol: function (index, columnIndex, sortOrder) {
              var col = $("#grid_summarygrid").getGridParam('colNames'); 
              var label = "Ordered by " + col[columnIndex] + " " + sortOrder + "ending";
  
              $("#gridsort").text(label);
          }
  });
  
  
      $("#grid").setGridParam({ url: '&lt;%= Url.Action(dataMethod, controllerName)%&gt;?qid=xxx', page: 1, datatype: "json" })
                          .trigger('reloadGrid');
  </code></pre>
  
  <p>Currently using jqGrid 4.4.1 and it loads data fine but once sort is applied it updates the sort label buy grid data is not sorted. What is going on? Any help most appreciated...</p>