Version

Collapsing Column Groups

The UltraGridGroups collection allows you to hide all columns assigned to them. This improves the readability of your grid by allowing users to quickly prioritize information most relevant to them.

The following screenshot demonstrates the UltraGrid control with expansion indicators on the column groups.

Collapsible Columns 1.png

The following screenshot demonstrates the UltraGrid control with the UnitsSold group collapsed.

Collapsible Columns 2.png

Enable Expansion Indicator

Note
Note

Ensure grouping is enabled on the grid first. Refer to the Enabling Grouping topic for more information.

Within the InitializeLayout event handler, set the Grid’s AllowGroupCollapsing property to true, as demonstrated in the following code snippet.

In Visual Basic:

Private Sub ultraGrid1_InitializeLayout(sender As Object, e As InitializeLayoutEventArgs)
      e.Layout.Override.AllowGroupCollapsing = Win.DefaultableBoolean.[True]
End Sub

In C#:

private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e)
{
    e.Layout.Override.AllowGroupCollapsing = Win.DefaultableBoolean.True;
}

The following screenshot demonstrates the UltraGrid control with the expansion indicators displayed to the left of the groups:

Collapsible Columns 3.png

Related Topics