GridView Aggregates Issue

8 posts, 0 answers
  1. Jonathan Barber
    Jonathan Barber avatar
    5 posts
    Member since:
    Aug 2009

    Posted 25 Apr 2013 Link to this post

    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>
  2. Jonathan Barber
    Jonathan Barber avatar
    5 posts
    Member since:
    Aug 2009

    Posted 25 Apr 2013 Link to this post

    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>
  3. DevCraft banner
  4. Jonathan Barber
    Jonathan Barber avatar
    5 posts
    Member since:
    Aug 2009

    Posted 25 Apr 2013 Link to this post

    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.
  5. Myles
    Myles avatar
    13 posts
    Member since:
    May 2012

    Posted 03 Sep 2013 Link to this post

    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?
  6. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 04 Sep 2013 Link to this post

    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 >>
  7. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 04 Sep 2013 Link to this post

    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 >>
  8. Myles
    Myles avatar
    13 posts
    Member since:
    May 2012

    Posted 04 Sep 2013 Link to this post

    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
  9. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 05 Sep 2013 Link to this post

    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 >>
Back to Top
DevCraft banner