
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
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

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 .
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

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..
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