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

GridView Aggregates Issue

7 Answers 82 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jonathan Barber
Top achievements
Rank 1
Jonathan Barber asked on 25 Apr 2013, 02:14 PM
I am using RadGridView 2013.1.220.1050, and I am using aggregates.  I am trying to follow the sample http://demos.telerik.com/silverlight/#GridView/Aggregates, where I want only "Show group header column aggregates".  However, I get the aggregates in-line, but dont get the group header aggregate.  Below is how I have my XAML, and I have tried so many things to hide the in-line and only show the group header, but with no success.  


        <telerik:RadGridView
                            x:Name="RadGridView1"
                            GroupRenderMode="Flat"
                            AutoExpandGroups="True"
                            telerik:StyleManager.Theme="Windows8"
                            RowIndicatorVisibility="Collapsed"
                            CanUserFreezeColumns="False"
                            IsReadOnly="False"
                            ShowGroupPanel="False"
                            ActionOnLostFocus="None"
                            ItemsSource="{Binding Companies}"
                            SelectionMode="Extended"
                            SelectionUnit="Cell"
                            AutoGenerateColumns="False"
                            ShowGroupFooters="False"
                            ShowColumnFooters="True"
                            Margin="5"
                            Grid.Row="2"
                            GridLinesVisibility="Both"
                            AlternateRowBackground="#EFEFEF"
                            AlternationCount="2">
            <telerik:RadGridView.GroupRowStyle>
                <Style TargetType="telerik:GroupHeaderRow">
                    <Setter Property="ShowHeaderAggregates" Value="False" />
                    <Setter Property="ShowGroupHeaderColumnAggregates" Value="True" />
                </Style>
            </telerik:RadGridView.GroupRowStyle>

7 Answers, 1 is accepted

Sort by
0
Jonathan Barber
Top achievements
Rank 1
answered on 25 Apr 2013, 03:37 PM
I figured it out.  Basically since I was setting the style of the GroupRow, it isnt the right style, so I moved it to the UserControl resources and it worked.


    <UserControl.Resources>
        <Style TargetType="telerik:GroupHeaderRow">
            <Setter Property="ShowGroupHeaderColumnAggregates" Value="True" />
            <Setter Property="ShowHeaderAggregates"  Value="False" />
        </Style>
    </UserControl.Resources>
0
Jonathan Barber
Top achievements
Rank 1
answered on 25 Apr 2013, 03:52 PM
This is an issue if you apply a Theme other than the default.  So, I had my theme set to Windows 8, but when I remove it the solution works.  I dont understand why this wouldnt work using a different theme.  Hopefully someone can check it out.
0
Myles
Top achievements
Rank 1
answered on 03 Sep 2013, 03:54 PM
I am having the same issue.  As soon as I use a theme other than the default the styles are ignored and the header aggregates appear.  Is there a work around for this?
0
Dimitrina
Telerik team
answered on 04 Sep 2013, 01:11 PM
Hello,

If you have applied a Theme different than the default one, then you should apply the Style against that Theme.  It seems that currently this cannot be done with a simple Style when using the Binaries.

I would suggest you to use the Binaries.NoXaml assemblies and Implicit Styles instead. You can check our online documentation for more information on the matter. 

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Dimitrina
Telerik team
answered on 04 Sep 2013, 01:18 PM
Hi,

I have performed some additional tests and I found out that the Style will be applied if you set an application Theme, similar to:

StyleManager.ApplicationTheme = new Windows8Theme();

and then define the Style as follows:
<Style TargetType="telerik:GroupHeaderRow" telerik:StyleManager.BasedOn="Windows8">
<Setter Property="ShowGroupHeaderColumnAggregates" Value="True" />
<Setter Property="Background" Value="Red"/>
</Style>
 
Let me know how this works for you.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Myles
Top achievements
Rank 1
answered on 04 Sep 2013, 02:36 PM
Yes this does the job thanks.  It's just a shame I had to hide the aggregates due to the issue specified in my related thread:

http://www.telerik.com/community/forums/silverlight/gridview/calculateaggregates-doesn-t-work.aspx#2773710
0
Dimitrina
Telerik team
answered on 05 Sep 2013, 07:38 AM
Hi,

I am glad to hear it worked.
I am also checking the issue you posted in the other forum thread. 

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Jonathan Barber
Top achievements
Rank 1
Answers by
Jonathan Barber
Top achievements
Rank 1
Myles
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or