ComponentOne Grid for WPF: Grid for WPF Appearance > Setting Group Total Visibility

Setting Group Total Visibility

The group total bar appears at the a group of columns, when the grid is in GroupBy mode and items are grouped together. It can be used to display sums, averages, and so on. By default the group total bar is collapsed and not visible, but you can set the group total bar to be visible or hidden through the GroupTotalBarVisibility property. Note that in the examples below, the grid has been grouped so that the group total bar is viewable.

GroupTotalBarVisibility is set to Collapsed

When the GroupTotalBarVisibility property is set to Collapsed, the group total bar appears collapsed and not visible. This is the default setting.

 

In XAML

You can set the GroupTotalBarVisibility property to Collapsed in the Properties window or by adding GroupTotalBarVisibility="Collapsed" to the <c1grid:C1DataGrid> tag so that it looks similar to the following:

<c1grid:C1DataGrid Name="C1DataGrid1" GroupTotalBarVisibility="Collapsed">

In Code

To set the GroupTotalBarVisibility property to Collapsed, add the following code to your project:

      Visual Basic

C1DataGrid1.GroupTotalBarVisibility = Windows.Visibility.Collapsed

      C#

c1DataGrid1.GroupTotalBarVisibility = Windows.Visibility.Collapsed;

GroupTotalBarVisibility is set to Visible

When the GroupTotalBarVisibility property is set to Visible, the group total bar is visible on the grid. If you're including group totals calculation in your grid, set GroupTotalBarVisibility to Visible.

 

In XAML

You can set the GroupTotalBarVisibility property to Visible in the Properties window or by adding GroupTotalBarVisibility="Visible" to the <c1grid:C1DataGrid> tag so that it looks similar to the following:

<c1grid:C1DataGrid Name="C1DataGrid1" GroupTotalBarVisibility="Visible">

In Code

To explicitly set the GroupTotalBarVisibility property to Visible, add the following code to your project:

      Visual Basic

C1DataGrid1.GroupTotalBarVisibility = Windows.Visibility.Visible

      C#

c1DataGrid1.GroupTotalBarVisibility = Windows.Visibility.Visible;

GroupTotalBarVisibility is set to Hidden

When the GroupTotalBarVisibility property is set to Hidden, the space where the group total bar should appear appears blank.

 

In XAML

You can set the GroupTotalBarVisibility property to Hidden in the Properties window or by adding GroupTotalBarVisibility="Hidden" to the <c1grid:C1DataGrid> tag so that it looks similar to the following:

<c1grid:C1DataGrid Name="C1DataGrid1" GroupTotalBarVisibility="Hidden">

In Code

To set the GroupTotalBarVisibility property to Hidden, add the following code to your project:

      Visual Basic

C1DataGrid1.GroupTotalBarVisibility = Windows.Visibility.Hidden

      C#

c1DataGrid1.GroupTotalBarVisibility = Windows.Visibility.Hidden;


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.