GroupFooterTemplate and server wrappers

3 posts, 1 answers
  1. Tom
    Tom avatar
    12 posts
    Member since:
    May 2013

    Posted 09 Jul 2013 Link to this post

    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. Answer
    Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2299 posts

    Posted 10 Jul 2013 Link to this post

    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!
  3. Tom
    Tom avatar
    12 posts
    Member since:
    May 2013

    Posted 10 Jul 2013 Link to this post

    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!
Back to Top