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

aggregatefunction and child grid

3 Answers 51 Views
GridView
This is a migrated thread and some comments may be shown as answers.
invivo
Top achievements
Rank 1
invivo asked on 03 Apr 2009, 09:51 AM

Hi,

First of all, sorry for my english ...
I just want to know if it's possible to have aggregate function for a child grid (hierarchy) as we can have with the grouping grid
(like the example Grouping aggregates)

thanks

Steph

3 Answers, 1 is accepted

Sort by
0
Missing User
answered on 03 Apr 2009, 12:59 PM
Hello invivo,

To achieve your goal you need to modify <telerik:RadGridView.HierarchyChildTemplate> as shown in the following code snippet:

<telerik:RadGridView.HierarchyChildTemplate> 
  <DataTemplate> 
       <telerik:GridViewDataControl> 
               <telerik:GridViewDataControl.GroupDescriptions> 
                      <data:RadGroupDescription PropertyName="Number"
                             <data:RadGroupDescription.AggregateFunctions> 
                                <data:CountFunction FunctionName="TotalNumbers" SourceField="Number" 
                                Caption="Total numbers:" /> 
                                <data:FirstFunction FunctionName="FirsNumber" SourceField="Number" 
                                Caption="First number:" /> 
                             </data:RadGroupDescription.AggregateFunctions> 
                      </data:RadGroupDescription> 
               </telerik:GridViewDataControl.GroupDescriptions> 
          </telerik:GridViewDataControl> 
      </DataTemplate> 
  </telerik:RadGridView.HierarchyChildTemplate> 

Sample application is attached. Having other questions - do not hesitate to contact us again.

Sincerely yours,
Anastasia
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
invivo
Top achievements
Rank 1
answered on 03 Apr 2009, 01:48 PM

Thanks a lot for your answer.

But my project looks like your example FirstLook (GridView).
is it possible to have aggregate function for my child grid but without recreate a RadGroupDescription ?

thanks

Steph

0
Milan
Telerik team
answered on 06 Apr 2009, 03:58 PM
Hi invivo,

Currently the aggregate funcations are part of your group description class and cannot be declared separately.

All the best,
Milan
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
invivo
Top achievements
Rank 1
Answers by
Missing User
invivo
Top achievements
Rank 1
Milan
Telerik team
Share this question
or