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
830
Collapsed Child Bands
posted

How do we change the behaviour of child bands in a grid so that they appear collapsed when the parent band is expanded.

Thanks John

  • 69832
    Suggested Answer
    Offline posted

    You could do something like handle BeforeRowExpanded, and conditionally call CollapseAll when the row being expanded is in a given band.

    Example:
    this.ultraGrid1.BeforeRowExpanded += new CancelableRowEventHandler(ultraGrid1_BeforeRowExpanded);

    void ultraGrid1_BeforeRowExpanded(object sender, CancelableRowEventArgs e)
    {
        if ( e.Row.Band.Index == 0 )
            e.Row.CollapseAll();
    }