When using search in the pager jqGrid sends fields ‘sidx’ and ‘sord’ to the server. We use these fields in our SQL, example:
“SELECT…. ORDER BY sidx sord”
This works fine. However, when using ‘Group by..’ in colMenu the field ‘sidx’ also contains the sort order. I can see why you do this because you can group on multiple fields. However, it breaks MySQL because the query looks like this:
“SELECT…. ORDER BY sidx sord sord”
We now check for ‘asc’ or ‘desc’ in field ‘sidx and if found don’t use field ‘sord’. However, it would be much better to do this in jqGrid, ie. leave ‘sord’ empty for grouping.