Hi,
How can I enforce that a UltraGridGroupByRow is not expandable? When user clicks on the + button, I want it has no effect instead of expanding the row.
I don't see there are any event I can capture with cancelable flag. And there is no setting to make the + button invisible.
Thanks.
Jason
Jason,
The BeforeRowExpanded event should provide what you need.
-Matt
Thanks Matt! This is working.
I have another question. Is there a setting I can't make the expansion indication '+' invisible for certain rows?
You could set the ExpansionIndicator property of an individual row during the InitializeRow event to ShowExpansionIndicator.Never.
thanks Matt.
You're right, it doesn't seem to work for a GroupByRow. I'm not sure if this is intentional behavior or not, though, so you should probably submit this to Developer Support so that they can have it looked into. In the meantime, you can prevent a row from being expanded by cancelling the BeforeRowExpanded event. If you really don't want to show the expansion indicators, you could use a creation filter to completely remove them, or a draw filter to prevent them from rendering; if you take the latter approach, you'd still have to prevent the row from being expanded since the element is still there, just not visible.