This question is locked. New answers and comments are not allowed.
Hello, I have a GridView defined in XAML where two columns have the Sum function defined. To get the totals to show up in the group footer, I had to add the group descriptor in the code behind. That works fine. However, the totals are also showing in the group header and I do not want that to happen. How can I turn those off?
Public Sub New()
InitializeComponent()
Dim gd = New GroupDescriptor With {.Member = "Unit.AdvCd"}
Me.UnitList.GroupDescriptors.Add(gd)
End Sub
<telerik:RadGridView x:Name="UnitList"
Grid.Row="2"
Grid.Column="1"
Margin="5"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AlternateRowBackground="Gray"
AutoExpandGroups="True"
AutoGenerateColumns="False"
Background="LightGray"
BorderBrush="{StaticResource McpicTealBrush}"
BorderThickness="0"
CanUserDeleteRows="False"
CanUserInsertRows="False"
CanUserSelect="False"
IsReadOnlyBinding="{Binding IsReadOnly}"
ItemsSource="{Binding UnitList}"
RowIndicatorVisibility="Collapsed"
RowLoaded="RadGridView_RowLoaded"
SelectionUnit="FullRow"
ShowColumnFooters="True"
ShowGroupFooters="True"
ShowGroupPanel="False"
telerik:StyleManager.Theme="Expression_Dark">
<telerik:RadGridView.SortDescriptors>
<telerik:SortDescriptor Member="Unit.UIC" SortDirection="Ascending" />
</telerik:RadGridView.SortDescriptors>
<telerik:RadGridView.Columns>
<telerik:GridViewToggleRowDetailsColumn Width="Auto" />
<telerik:GridViewDataColumn Width="Auto"
DataMemberBinding="{Binding Unit.UIC}"
Header="UIC"
HeaderTextAlignment="Center"
IsFilterable="True"
IsReadOnly="True"
IsSortable="True"
ShowDistinctFilters="True"
ShowFieldFilters="False"
SortMemberPath="Unit.UIC" />
<telerik:GridViewDataColumn Width="Auto"
DataMemberBinding="{Binding Unit.AdvCd}"
Header="MSE"
HeaderTextAlignment="Center"
IsFilterable="True"
IsGroupable="True"
IsReadOnly="True"
IsSortable="True"
ShowDistinctFilters="True"
ShowFieldFilters="False"
SortMemberPath="Unit.AdvCd"
UniqueName="MSE" />
<telerik:GridViewDataColumn Width="*"
DataMemberBinding="{Binding Unit.Name}"
Header="Name"
IsFilterable="False"
IsReadOnly="True"
IsSortable="True"
ShowDistinctFilters="False"
ShowFieldFilters="False"
SortMemberPath="Unit.Name" />
<telerik:GridViewDataColumn Width="Auto"
DataMemberBinding="{Binding Unit.IsDetachment}"
Header="Type"
IsFilterable="True"
IsReadOnly="True"
IsSortable="True"
ShowDistinctFilters="True"
ShowFieldFilters="False"
SortMemberPath="Unit.IsDetachment"/>
<telerik:GridViewDataColumn Width="Auto"
DataMemberBinding="{Binding RatedQty}"
FooterTextAlignment="Right"
Header="OPFOR Qty"
IsFilterable="True"
IsReadOnly="True"
IsSortable="True"
ShowDistinctFilters="False"
ShowFieldFilters="True"
SortMemberPath="RatedQty"
TextAlignment="Right"
UniqueName="RatedQtyColumn">
<telerik:GridViewDataColumn.AggregateFunctions>
<telerik:SumFunction />
</telerik:GridViewDataColumn.AggregateFunctions>
</telerik:GridViewDataColumn>
<telerik:GridViewDataColumn Width="Auto"
DataMemberBinding="{Binding MissionQty}"
FooterTextAlignment="Right"
Header="Mission Qty"
IsFilterable="True"
IsReadOnly="False"
IsSortable="True"
ShowDistinctFilters="False"
ShowFieldFilters="True"
SortMemberPath="MissionQty"
TextAlignment="Right"
UniqueName="MissionQtyColumn">
<telerik:GridViewDataColumn.AggregateFunctions>
<telerik:SumFunction SourceField="MissionQty" />
</telerik:GridViewDataColumn.AggregateFunctions>
</telerik:GridViewDataColumn>
<telerik:GridViewDataColumn Width="Auto"
DataMemberBinding="{Binding IsSubmitted}"
Header="Submitted"
IsFilterable="True"
IsReadOnly="True"
IsSortable="True"
ShowDistinctFilters="True"
ShowFieldFilters="False"
SortMemberPath="IsSubmitted"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Public Sub New()
InitializeComponent()
Dim gd = New GroupDescriptor With {.Member = "Unit.AdvCd"}
Me.UnitList.GroupDescriptors.Add(gd)
End Sub
<telerik:RadGridView x:Name="UnitList"
Grid.Row="2"
Grid.Column="1"
Margin="5"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
AlternateRowBackground="Gray"
AutoExpandGroups="True"
AutoGenerateColumns="False"
Background="LightGray"
BorderBrush="{StaticResource McpicTealBrush}"
BorderThickness="0"
CanUserDeleteRows="False"
CanUserInsertRows="False"
CanUserSelect="False"
IsReadOnlyBinding="{Binding IsReadOnly}"
ItemsSource="{Binding UnitList}"
RowIndicatorVisibility="Collapsed"
RowLoaded="RadGridView_RowLoaded"
SelectionUnit="FullRow"
ShowColumnFooters="True"
ShowGroupFooters="True"
ShowGroupPanel="False"
telerik:StyleManager.Theme="Expression_Dark">
<telerik:RadGridView.SortDescriptors>
<telerik:SortDescriptor Member="Unit.UIC" SortDirection="Ascending" />
</telerik:RadGridView.SortDescriptors>
<telerik:RadGridView.Columns>
<telerik:GridViewToggleRowDetailsColumn Width="Auto" />
<telerik:GridViewDataColumn Width="Auto"
DataMemberBinding="{Binding Unit.UIC}"
Header="UIC"
HeaderTextAlignment="Center"
IsFilterable="True"
IsReadOnly="True"
IsSortable="True"
ShowDistinctFilters="True"
ShowFieldFilters="False"
SortMemberPath="Unit.UIC" />
<telerik:GridViewDataColumn Width="Auto"
DataMemberBinding="{Binding Unit.AdvCd}"
Header="MSE"
HeaderTextAlignment="Center"
IsFilterable="True"
IsGroupable="True"
IsReadOnly="True"
IsSortable="True"
ShowDistinctFilters="True"
ShowFieldFilters="False"
SortMemberPath="Unit.AdvCd"
UniqueName="MSE" />
<telerik:GridViewDataColumn Width="*"
DataMemberBinding="{Binding Unit.Name}"
Header="Name"
IsFilterable="False"
IsReadOnly="True"
IsSortable="True"
ShowDistinctFilters="False"
ShowFieldFilters="False"
SortMemberPath="Unit.Name" />
<telerik:GridViewDataColumn Width="Auto"
DataMemberBinding="{Binding Unit.IsDetachment}"
Header="Type"
IsFilterable="True"
IsReadOnly="True"
IsSortable="True"
ShowDistinctFilters="True"
ShowFieldFilters="False"
SortMemberPath="Unit.IsDetachment"/>
<telerik:GridViewDataColumn Width="Auto"
DataMemberBinding="{Binding RatedQty}"
FooterTextAlignment="Right"
Header="OPFOR Qty"
IsFilterable="True"
IsReadOnly="True"
IsSortable="True"
ShowDistinctFilters="False"
ShowFieldFilters="True"
SortMemberPath="RatedQty"
TextAlignment="Right"
UniqueName="RatedQtyColumn">
<telerik:GridViewDataColumn.AggregateFunctions>
<telerik:SumFunction />
</telerik:GridViewDataColumn.AggregateFunctions>
</telerik:GridViewDataColumn>
<telerik:GridViewDataColumn Width="Auto"
DataMemberBinding="{Binding MissionQty}"
FooterTextAlignment="Right"
Header="Mission Qty"
IsFilterable="True"
IsReadOnly="False"
IsSortable="True"
ShowDistinctFilters="False"
ShowFieldFilters="True"
SortMemberPath="MissionQty"
TextAlignment="Right"
UniqueName="MissionQtyColumn">
<telerik:GridViewDataColumn.AggregateFunctions>
<telerik:SumFunction SourceField="MissionQty" />
</telerik:GridViewDataColumn.AggregateFunctions>
</telerik:GridViewDataColumn>
<telerik:GridViewDataColumn Width="Auto"
DataMemberBinding="{Binding IsSubmitted}"
Header="Submitted"
IsFilterable="True"
IsReadOnly="True"
IsSortable="True"
ShowDistinctFilters="True"
ShowFieldFilters="False"
SortMemberPath="IsSubmitted"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>