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.