Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
20
Column IsGroupByColumn option
posted

Hallo

I would like to set the grouping by the column from the code.

Unfortunately, IsGroupByColumn property is read-only.

How can I set the grouping?

Currently I'm trying to do it the following way:

grid.DisplayLayout.Bands[0].Columns[i].IsGroupByColumn

 and I get the error

Property or indexer 'Infragistics.Win.UltraWinGrid.UltraGridColumn.IsGroupByColumn' cannot be assigned to -- it is read only 

 Regards

Hubert

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    Hi Hubert,

    Grouping and sorting are tightly linked. So you need to use the SortedColumns collection on the band. The third parameter to this method specifies whether the column should be grouped. 

    grid.DisplayLayout.Bands[0].SortedColumn.Add(...)

     

Children