2012-10-12 61 views
0

這是我在控制器代碼:telerik-mvc網格 - 如何格式頁腳模板?

[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() 
%> 

我想知道我怎麼可以把自定義頁腳模板的格式如下:

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

請幫助我如何做到這一點。謝謝!

回答