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
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?
Hello,
Currently there is no build in functionality that comes out of the box to handle this request. You can submit a new product idea on our website if you would like to see it implemented.
Implementing this may proove to be more complicated than just getting the ExpansionIndicatorUIElement event clicked, as this element is a [+] at the beginning, and once the band is expanded, it changes to [-]. If you get to the expanding/collapsing events and cancel them to apply your own logic, as the event is cancelled, the state of the indicator will not change as well. This means if you cancel expanding, you will not be able to collapse at all.
If I could suggest, adding a button column at the beginning of the grid with this functionality might be much lighter task to do. You could shape the buttons to look like expansion buttons and hide the Grid's expansion UI elements, so it can look almost the same.
Sincerely,Tihomir TonevAssociate Software DeveloperInfragistics
thank you for your answer. This is the solution I will go with, because it seem like it can be implemented in reasonable time.
Hello Sascha,
I'm glad that you have found my suggestion helpful.
Thank you for using Infragistics Components.
Please let us know if you need any help getting this to work.