I have a jqGrid that I set up like this
gridAltMpn.jqGrid({ 
  autowidth: true,
  shrinkToFit: true,
  datatype : 'local', 
  data : input, 
  height : '100',
  scrollrows: true,
  scrollOffset : '0', 
  hidegrid : false,
  colNames : [ 'P', 'MPN' ],
  colModel : [ 
     { name : 'Col1', width : 30, align:'center' }, 
     { name : 'Col2', width : 250, sorttype: 'integer'} 
  ],
  pager : '#altmpn_pager', 
  pagerpos : 'left', 
  scroll: 50,
  gridview : true, 
  caption : 'A useful table title',
  emptyRecordText : '<div id="no_data_msg" style="text-align:center"> No Results Found</div>', 
  hoverrows : true,      
  onSelectRow: function(id) {
     var gsr = gridAltMpn.jqGrid('getGridParam', 'selrow');
     if (gsr) {
        var rowData = gridAltMpn.jqGrid('getRowData', gsr);
        if ($("input[name='optInvInqType']:checked").val() == 'MPN') {
           getInvInq("MPN", rowData.MPN);
        }
     }
  },
  loadComplete: function() { 
     gridAltMpn.setSelection(gridAltMpn.getDataIDs()[0], true); 
  }
});
The data in this grid looks like this
XX 774860A6                   
   774860A8                   
   774860A4                   
   774860A3                   
   774860A10                  
   STARTER, PNEUM,PW4000 
When the grid is first loaded that it fine but if the user wants to sort by the second column it ends up like this
   774860A10                  
   774860A3                   
   774860A4                   
XX 774860A6                   
   774860A8                   
   STARTER, PNEUM,PW4000      
The 774860A10 should go after the 774860A8 just like in an integer sort. I cannot use an integer sort because these are not integers as there is some alpha characters in there. In other words I want a text entry to sort like an integer. Do I need to use a custom sort routine and then have my Javascript to do a integer like sort? I also don't need this sorted on the first time because my server sorts it by the first column. The user might want it sorted by the second column