I came up with the following solution, which works in removing the empty groups…
control.jqxGrid(settings);
control.jqxGrid('exportInitialize', exportFileName);
control.on("bindingcomplete", function (event) {
var $emptygroup = $('.jqx-grid-groups-row-details:empty');
var $emptycell = $('.jqx-grid-empty-cell');
if ($emptygroup.length) {
$emptygroup.parent().parent().parent().nextAll().remove();
if ($emptycell.length == 0) {
$emptygroup.parent().parent().parent().remove();
}
$(".jqx-grid-content").css("border-bottom", "1px solid #aaa");
}
control.jqxGrid('expandallgroups');
});
The only issue remaining, is that the height of the grid does not change, it just shows white space. Is there a way to recalculate the height after a change like this?