First of all you have to fix the grouping options options which you use. You have to use
groupOrder: ["desc"]
instead of
groupOrder: "desc"
The main problem with ignoring of "desc"
grouping order exist already in old version of jqGrid (see the line of jqGrid 4.6 and the line of jqGrid 4.7).
I fixed the code in free jqGrid. The demo which uses the latest version of free jqGrid from GitHub don't have more the described problem: https://jsfiddle.net/OlegKi/bkqce0s0/11/
If you have to use old version of free jqGrid of jqGrid then you can solve the problem by changing datatype
from "jsonstring"
to "local"
:
onInitGrid: function () {
var p = $(this).jqGrid("getGridParam"),
userdata = p.datastr.userdata;
// filter the data and remove some items
p.data = $.grep(p.datastr, function (item) {
return item.ComponentType !== "";
});
p.userData = userdata;
p.datatype = "local";
}
The demo http://jsfiddle.net/OlegKi/bkqce0s0/12/