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

GroupFooterTemplate and server wrappers

2 Answers 121 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tom
Top achievements
Rank 1
Tom asked on 09 Jul 2013, 07:42 PM
Can someone point me to an example of using the GroupFooterTemplate with the MVC Server Wrappers?

From what I can tell, this should work when I 'group by' any column:
.GroupFooterTemplate( f => "Sum: " + f.Sum )

Is there any other setup / configuration that's needed to make it work?

Edit:
I've add this to the DataSource as well without success
.Aggregates( a => a.Add(c => c.Quantity).Sum())

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimiter Madjarov
Telerik team
answered on 10 Jul 2013, 11:22 AM
Hello Tom,


If a server binding is used in the current scenario, then this is the exact configuration, that should be used to specify a sum group footer template for the Quantity column i.e. add the required aggregates to the dataSource configuration and specify the template.

You could find a complete demo on server aggregates in the solution, which is included in your Kendo UI distribution. It is in the /wrappers/aspnetmvc/Examples folder.

 

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Tom
Top achievements
Rank 1
answered on 10 Jul 2013, 01:10 PM
Dimiter,

Your answer pointed me in the right direction.  There are different templates based on whether your using Ajax() or Server() in your DataSource.  We're using Ajax() and with ClientFooterTemplate / ClientGroupFooterTemplate everything shows-up the way it should.

Thank you!
Tags
Grid
Asked by
Tom
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Tom
Top achievements
Rank 1
Share this question
or