@{
    ViewBag.Title = "Home Page";
}

@(Html.Telerik().Grid<CustomBindingAggregates.Models.Product>()
        .Name("Grid")
        .EnableCustomBinding(true)
        .Columns(columns =>
        {
            columns.Bound(p => p.ID);
            columns.Bound(p => p.Name);
            columns.Bound(p => p.UnitPrice).Aggregate(a => a.Sum())
                  .ClientFooterTemplate("<#=Sum#>")
                  .ClientGroupFooterTemplate("<#=Sum#>");
        })
        .DataBinding(dataBinding => dataBinding.Ajax().Select("_Select", "Home"))                
        .Groupable(groupable => groupable.Visible(false).Groups(g => g.Add(p => p.UnitPrice)))
)