Summary Grid for RadGridView

6 posts, 0 answers
  1. Pranama Moorthy
    Pranama Moorthy avatar
    26 posts
    Member since:
    Jun 2010

    Posted 08 Jul 2010 Link to this post

    Hi Telerik Team,
                                 I have a radGrid view with very basic data (this is only for illustration purpose, actual data is generated dynamcially and is bound to the radGrid), as shown in the attached file under the name "RadGrid", Now I want to create a SummaryGrid which would show me data as shown in "Summary Grid Desired". I want this grid to actually bind to the data in "RadGrid", could you please let me know whats the best way to create this grid (or probably I may have to use some other control). The thing is each of the cell in "Summary Grid Desired" is a count of the data.. in RadGrid.

    Any help is much appreciated.

    Thanks and Regards,
    Pranama
  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 08 Jul 2010 Link to this post

    Hello Pranama Moorthy,

    The best way would be to place some text blocks an ordinary  Grid panel . The values may be calculated by RadGridView 
    This you could achieve by adding aggregate functions to the columns of RadGridView. The column has an AggregateFunctions property which allows you to add the functions.
    You can read the results from the RadGridView.AggregateResults property.

    Kind regards,
    Pavel Pavlov
    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
  3. DevCraft banner
  4. Pranama Moorthy
    Pranama Moorthy avatar
    26 posts
    Member since:
    Jun 2010

    Posted 08 Jul 2010 Link to this post

    HI,
           When I try to get the Aggregate Results, it always returns be 0.  I tried the below

    this

     

    .TestGrid.AggregateResults;

     



    Also my XAMl is as below

     

     

    <telerikGridView:RadGridView ItemsSource="{Binding Collection}" x:Name="TestGrid" AutoGenerateColumns="False">

     

     

     

    <telerikGridView:RadGridView.GroupDescriptors>

     

     

     

    <TelerikData:GroupDescriptor Member="Property1">

     

     

     

    <TelerikData:GroupDescriptor.AggregateFunctions>

     

     

     

    <TelerikData:CountFunction FunctionName="Test"/>

     

     

     

    </TelerikData:GroupDescriptor.AggregateFunctions>

     

     

     

    </TelerikData:GroupDescriptor>

     

     

     

    <TelerikData:GroupDescriptor Member="Property2">

     

     

     

    </TelerikData:GroupDescriptor>

     

     

     

    </telerikGridView:RadGridView.GroupDescriptors>

     

     

     

     

    <telerikGridView:RadGridView.Columns>

     

     

     

    <telerikGridView:GridViewDataColumn DataMemberBinding="{Binding Property1}"/>

     

     

     

    <telerikGridView:GridViewDataColumn DataMemberBinding="{Binding Property2}"/>

     

     

     

     

    </telerikGridView:RadGridView.Columns>

     

     

     

     

    </telerikGridView:RadGridView>

    Let me know how best to get the results, of the aggregate functions, I am trying to get the results when I click a button .

     

  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 09 Jul 2010 Link to this post

    Hi,

     This property will be populated when you have aggregates for grid columns. You can check this demo for more info.

    Greetings,
    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
  6. Pranama Moorthy
    Pranama Moorthy avatar
    26 posts
    Member since:
    Jun 2010

    Posted 09 Jul 2010 Link to this post

    Hi, I am finding it really hard to accomplish what I had asked earlier, with the Aggregate Results I am just getting the summed up count for each column, but how do I get the count when they are grouped.. really confused.. any examples would be useful.

    the example that you provided was simple enough as it found the min from a column, but I need to get the counts when it is actually grouped..
  7. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 09 Jul 2010 Link to this post

    Hello,

    Have you tried to group the grid in this demo and check the group headers and footers? Aggregate functions can be applied for both columns and group descriptors - the result from columns will be displayed as column footer and the result from group descriptors in group headers.

    All the best,
    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
Back to Top
DevCraft banner