Hej
Im trying to use the Kendo Grid for a minor project, where i want to show the column summary in the groupheader. But I cant get it to Work :-(. When i use the Groupfooter, then it works fine.
Anyone got any suggestions?
************************************************************************************
@(Html.Kendo().Grid((IEnumerable<FTEReport>)ViewBag.Test)
.Name("grid")
.Columns(columns =>
{
columns.Bound(FTEReport => FTEReport.Jan)
.ClientGroupHeaderTemplate("#=sum#");
columns.Bound(FTEReport => FTEReport.Feb)
.ClientGroupFooterTemplate("#=sum#");
}
.DataSource(ds => ds.Ajax()
.Aggregates(aggregates =>
{
aggregates.Add(p => p.Jan).Sum();
aggregates.Add(p => p.Feb).Sum();
})
.Group(g =>
{
g.Add(c => c.Allocated);
g.Add(c => c.Project);
g.Add(c => c.Department);
})
.Read(read => read.Action("Aggregates_Read", "grid"))
)
)
Regards
Lennart
Im trying to use the Kendo Grid for a minor project, where i want to show the column summary in the groupheader. But I cant get it to Work :-(. When i use the Groupfooter, then it works fine.
Anyone got any suggestions?
************************************************************************************
@(Html.Kendo().Grid((IEnumerable<FTEReport>)ViewBag.Test)
.Name("grid")
.Columns(columns =>
{
columns.Bound(FTEReport => FTEReport.Jan)
.ClientGroupHeaderTemplate("#=sum#");
columns.Bound(FTEReport => FTEReport.Feb)
.ClientGroupFooterTemplate("#=sum#");
}
.DataSource(ds => ds.Ajax()
.Aggregates(aggregates =>
{
aggregates.Add(p => p.Jan).Sum();
aggregates.Add(p => p.Feb).Sum();
})
.Group(g =>
{
g.Add(c => c.Allocated);
g.Add(c => c.Project);
g.Add(c => c.Department);
})
.Read(read => read.Action("Aggregates_Read", "grid"))
)
)
Regards
Lennart