Hi,
I’d like to dynamically show/hide the groups header. Bascially I want the groups header to show up after one column has been defined as grouping column via context menu. I want the groups header to disappear when all groups have been removed.
To achive the above I hooked a handler to the “groupschanged” event:
mTableObject.on(‘groupschanged’, onGroupsChanged);
and coded it like this:
function onGroupsChanged(event) { var groupingStatus = event.args.groups.length > 0; mTableObject.jqxGrid('showgroupsheader', groupingStatus); // mTableObject.jqxGrid('render'); // mTableObject.jqxGrid('render');}
Sadly that does not really work. The grouping header does not show up. I tried adding a “refresh”, which onlymakes a white empty bar appear in the location where the grouping header should be. After that I tried calling “render” after calling “showgroupsheader”, this actually works in the sense that the grouping headr appears correctly, but has 2 major drawbacks: 1) It is a time consuming operation, and 2) It destroys my carefully alligned column layout, ie. all columns forget their current size and instead go back to “auto”.
Is there a way to dynamically show/hide the grouping header without having to resort to “render” ?
Regards,
Stephan