jQWidgets Forums

jQuery UI Widgets Forums Grid Dynamic show/hide of "Groups Header"

This topic contains 0 replies, has 1 voice, and was last updated by  stephan 11 years, 7 months ago.

Viewing 1 post (of 1 total)
  • Author
  • Dynamic show/hide of "Groups Header" #32637

    stephan
    Participant

    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

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.