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
20
UltraGrid collapse group by row but still show one row
posted

Hi,

I want to replace the "collapse-action" when pressing the minus symbol next to the group by row to still show one  of its child rows.
When pressing again (like normal) it should show all rows in the group again.

Is there a provided way to do this?

Or do I have to get the "minus"-Button-clicked-Event and hide the rows manually? (if it is possible to override/get the events)


best regards

Parents
No Data
Reply
  • 469350
    Offline posted

    So if I understand, what you essentially want here is to have 3 states: Collapse: Expanded, and Sorta-Expanded-With-Just-One-Row-Shown. 

    The built-in expansion indicator only has two states and it toggles between the two. So this would be very tricky to achieve. The approach I would take is to use a CreationFilter and replace the ExpanionIndicatorUIElement in the row with some new UIElement that I created that keeps track of the state and uses an enum for the three states and then stores the state in the Tag property of the row.

    But this is not trivial and it would require a lot of experimentation and a good chunk of code. 

    What do you want the expansion indicator to show when you are in the third state where only one row is displayed? Do you want it to just as expanded or collapsed or some third, custom appearance?

Children
No Data