I'd like users to only be able to group by a certain set of particular columns. Some columns make sense to group by (categorical data), others don't (numerical data).
I see that I can set AllowGroupBy at the column level, but it is rather tedious to do this for every column, if we are disabling most of the columns. Is there a way to disable AllowGroupBy on an entire band or the grid itself, and then re-enable it for particular columns? My initial attempts say no.
Yes, you can. The AllowGroupBy property exists on both the UltraGridColumn and on the Override object. That means you can set it on the column, the band.Override, or the DisplayLayout.Override.
So in your case, you will probably want to set it to False on the DisplayLayout and then enable it on only the columns you want.
I'm setting the AllowGroupBy on the column level like this:
.Bands(0).Columns("Key").AllowGroupBy
Is that right? I'm unable to get it to work. I've attached a sample VB project. Try grouping by First (duplicates exist) or SomeBoolean.
Jeffrey,
I have submitted this issue for development review. A support case has been opened for you and you will receive more information on this through the support case.
Yea, that's what I figured too, more specific would override the general settings.
Thanks for your help.
Hm, that's odd. The resolution logic is ignoring the setting on the column if the band it not allowing GroupBy, which seems backward.
The override resolution process is used in quite a few places in the grid and as a rule, the more specific settings (the column in this case) takes precedence over the more general (the DisplayLayout) setting.
There are certain exceptions, though, so I'm not sure if this was intentional of if it's a bug. I'm going to forward this over to Infragistics Developer Support and ask them to create a case for you so this can be investigated further.