Setting GroupBy Area Visibility
The GroupBy area allows end users to group the grid by columns headers. For more information, see Grouping Columns. By default the GroupBy area is visible, but you can also set the GroupBy area to be hidden or collapsed by using the GroupByVisibility property.
GroupByVisibility is set to Visible
When the GroupByVisibility property is set to Visible, content can be grouped. This is the default setting.
In XAML
You can set the GroupByVisibility property to Visible in the Properties window or by adding GroupByVisibility="Visible" to the <c1grid:C1DataGrid> tag so that it looks similar to the following:
<c1grid:C1DataGrid Name="C1DataGrid1" GroupByVisibility="Visible">
In Code
To explicitly set the GroupByVisibility property to Visible add the following code to your project:
C1DataGrid1.GroupByVisibility = Windows.Visibility.Visible
• C#
c1DataGrid1.GroupByVisibility = Windows.Visibility.Visible;
GroupByVisibility is set to Hidden
When the GroupByVisibility property is set to Hidden, the space where the GroupBy area should appear appears blank and columns cannot be grouped.
In XAML
You can set the GroupByVisibility property to Hidden in the Properties window or by adding GroupByVisibility="Hidden" to the <c1grid:C1DataGrid> tag so that it looks similar to the following:
<c1grid:C1DataGrid Name="C1DataGrid1" GroupByVisibility="Hidden">
In Code
To set the GroupByVisibility property to Hidden add the following code to your project:
C1DataGrid1.GroupByVisibility = Windows.Visibility.Hidden
• C#
c1DataGrid1.GroupByVisibility = Windows.Visibility.Hidden;
GroupByVisibility is set to Collapsed
When the GroupByVisibility property is set to Collapsed, the GroupBy area and the space where it should appear are collapsed and not visible and columns cannot be grouped.
In XAML
You can set the GroupByVisibility property to Collapsed in the Properties window or by adding GroupByVisibility="Collapsed" to the <c1grid:C1DataGrid> tag so that it looks similar to the following:
<c1grid:C1DataGrid Name="C1DataGrid1" GroupByVisibility="Collapsed">
In Code
To set the GroupByVisibility property to Collapsed add the following code to your project:
C1DataGrid1.GroupByVisibility = Windows.Visibility.Collapsed
• C#
c1DataGrid1.GroupByVisibility = Windows.Visibility.Collapsed;
|