This is a migrated thread and some comments may be shown as answers.

Remove Group Column Totals in Footer

3 Answers 113 Views
GridView
This is a migrated thread and some comments may be shown as answers.
John Morris
Top achievements
Rank 1
John Morris asked on 21 Jun 2010, 04:01 AM
Hello.  My grid totals each column and has a group summary.  I can't seem to get rid of the column totals in the group.

The attached image shows what I'm trying to remove.

Thank you.

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 21 Jun 2010, 06:34 AM
Hi,

 You can use ShowHeaderAggregates property of GridViewGroupRow. Here is an example:

<telerik:RadGridView ItemsSource="{Binding}">
  <telerik:RadGridView.GroupRowStyle>
    <Style TargetType="telerik:GridViewGroupRow">
      <Setter Property="ShowHeaderAggregates" Value="False"/>
    </Style>
  </telerik:RadGridView.GroupRowStyle>
</telerik:RadGridView>

Regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
John Morris
Top achievements
Rank 1
answered on 22 Jun 2010, 05:18 AM
Thank you.  I'd like to keep the total allocated and remove the Jan-Dec column "sums" as shown in the uploaded image.

Is this possible?  My Q3 2009 XAML worked perfectly but Q1 and Q1 SP2 do not so I'm trying to figure out how to make it work.  In Q3, I simply had the following footer.  It did not render group column totals by default.

<telerikGridView:GridViewDataColumn.Footer > 
                                            <Telerik_Windows_Controls_GridView:AggregateResultsList ItemsSource="{Binding}" HorizontalAlignment="Right" VerticalAlignment="Center"
                                                <Telerik_Windows_Controls_GridView:AggregateResultsList.ItemTemplate> 
                                                    <DataTemplate> 
                                                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Height="40"
                                                            <TextBlock VerticalAlignment="Center" TextAlignment="Right" FontSize="11" x:Name="txtJanFtr" FontWeight="Bold" Text="{Binding FormattedValue}" />                                                
                                                        </StackPanel> 
                                                    </DataTemplate> 
                                                </Telerik_Windows_Controls_GridView:AggregateResultsList.ItemTemplate> 
                                                <Telerik_Windows_Controls_GridView:AggregateResultsList.ItemsPanel> 
                                                    <ItemsPanelTemplate> 
                                                        <StackPanel Orientation="Vertical" /> 
                                                    </ItemsPanelTemplate> 
                                                </Telerik_Windows_Controls_GridView:AggregateResultsList.ItemsPanel> 
                                            </Telerik_Windows_Controls_GridView:AggregateResultsList> 
                                        </telerikGridView:GridViewDataColumn.Footer>  






0
Milan
Telerik team
answered on 25 Jun 2010, 02:11 PM
Hi John Morris,

You can get the old behavior by adding the GroupDescriptor programatically. You can try something like this:

private bool loaded = false;
  
// subscribe to DataLoaded event
void clubsGrid_DataLoaded(object sender, EventArgs e)
{
    if (loaded)
        return;
  
    this.loaded = true;
  
    GroupDescriptor desctiptor = new GroupDescriptor();
    desctiptor.Member = "Number";
    desctiptor.AggregateFunctions.Add(new MaxFunction() { SourceField = "Number" });
  
    this.clubsGrid.GroupDescriptors.Add(desctiptor);
}

Greetings,
Milan
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
John Morris
Top achievements
Rank 1
Answers by
Vlad
Telerik team
John Morris
Top achievements
Rank 1
Milan
Telerik team
Share this question
or