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

Summary Grid for RadGridView

5 Answers 114 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pranama Moorthy
Top achievements
Rank 1
Pranama Moorthy asked on 08 Jul 2010, 10:52 AM
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

5 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 08 Jul 2010, 11:52 AM
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
0
Pranama Moorthy
Top achievements
Rank 1
answered on 08 Jul 2010, 04:45 PM
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 .

 

0
Vlad
Telerik team
answered on 09 Jul 2010, 06:32 AM
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
0
Pranama Moorthy
Top achievements
Rank 1
answered on 09 Jul 2010, 11:12 AM
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..
0
Vlad
Telerik team
answered on 09 Jul 2010, 12:07 PM
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
Tags
GridView
Asked by
Pranama Moorthy
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Pranama Moorthy
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or