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

[Solved] Custom footer template in mvc grid

0 Answers 90 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sam
Top achievements
Rank 1
Sam asked on 11 Oct 2012, 10:55 PM
This is my code in the controller:


[GridAction]
        public ActionResult _Select()
        {
            // Creating dummy data to bind the grid 
            var data = Enumerable.Range(1, 100)
                                 .Select(index => new Customer
                                 {
                                     ID = index,
                                     Name = "Customer #" + index,
                                     Tax = 1 + index,
                                     Amount = 500 + index
                                 });


            return View(new GridModel(data));
        }

<%: Html.Telerik().Grid<GridLoadedWithAjaxInTabStrip.Models.Customer>()
        .Name("Grid")
        .Columns(columns =>
        {
            columns.Bound(c => c.ID).Width(200);
            columns.Bound(c => c.Name);
            columns.Bound(c => c.Tax);
           columns.Bound(p => p.Amount);
                            
        })


        .DataBinding(dataBinding => dataBinding.Ajax().Select("_Select", "Home")) 
        .Sortable()
        .Pageable()
        .Groupable()
        .Filterable()
%>

I would like to know how I can put a custom total in this format:

Total Tax:       XXXXX
Total Amount: XXXXX
Grand Total:   XXXXXXX

Please help.  Thanks!
Tags
Grid
Asked by
Sam
Top achievements
Rank 1
Share this question
or