Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
300
WHDG - Outlook GroupBy - Expand / Collapse behavior question
posted

Hello,

I have a single level data WHDG with OutlookGroupby on a single column. I can expand and collapse the groups just fine using either the expand/collapse graphic or by double-clicking on the GroupBy row.

Here's my question. I would like to expand and collapse the groups by just clicking on the GroupBy row (instead of double-clicking). How can I do this?

Thanks.

  • 300
    Verified Answer
    posted

    Not sure if this is a recommended solution, but, the following function (mapped to the client-side "click" event of the whdg) works:

    function WHDGrid1_ContainerGrid_Click(sender, eventArgs)
    {
        ///<param name="sender" type="Infragistics.Web.UI.WebHierarchicalDataGrid"></param>
        ///<param name="eventArgs" type="Infragistics.Web.UI.ItemEventArgs"></param>
        var ctype = eventArgs.get_type();
        if (ctype)
            if (ctype == "row") {
                if (eventArgs.get_item()._level)
                    var clevel = eventArgs.get_item()._get_level();
                    if (clevel)
                        if (clevel == "0") {
                            var cexpstatus = eventArgs.get_item().get_expanded();
                            if (cexpstatus)
                                eventArgs.get_item().set_expanded(false);
                            else
                                eventArgs.get_item().set_expanded(true);
                        }
            }
    }