What's the best way of doing this. We'd like to provide a bit of a visual cue to the user when all the groups are collapsed, as it's a bit visually unappealing by default.
I'd like to be able to specify a different colour at the "Type" level to provide a better visual cue of the hierarchy
Hi,
Please let me know if you have additional question regarding Mike's solution.
Yes, found a thread describing exactly that, and implemented it as an extension method. Given the original property exists, It seems a strange property to hide though?
If you want to determine the depth (level) of the GroupByRow, then this is pretty easy. You just walk up the parent chain (ParentRow property) and count the parents.
private int GetRowDepth(UltraGridRow row) { int depth = 0; while(row.ParentRow != null) { row = row.ParentRow; depth++; } return depth; }
GroupByRowLevel property on the row looks to be exactly what is needed. Only problem is that it's declared as Friend, so I can't access it :-(
Yes, an exception - typo. Basically, if I set the Appearance.BackColor property of the row referenced by the event, I got an exception. Seems to have gone away with a full rebuild though, so not to worry
Still not sure to determine what my grouping level is though. Ie, in the screenshot at the start of the thread there are two levels of grouping. For a given GroupBy row, how can I tell which level it belongs to?