HI,
Ive got the following gridview with totals.
However if I want to fill, the last two columns , its shows the results, but it is removing the totals. What am I doing wrong ?

here is my input ( gridview above)
here is my code for the kendo gridview to show the other two colums
- class="row">class="col-lg-12 col-md-12 col-sm-12 col-xs-12">however when I used the uncommenced code .Template(c => {}).ClientTemplate("#=calculateField(data)#") and //.ClientFooterTemplate("Totaal: #=sum#"); , it is showing the result of the column but it has removed my totals...... ( see picture)
Organisatiebreed
- @(Html.Kendo().Grid
() - .HtmlAttributes(new { @class = "table-responsive" })
- .Name("OrderLinesGrid")
- .Selectable(s => s.Enabled(false))
- .Reorderable(r => r.Columns(false))
- .Resizable(r => r.Columns(true))
- .Scrollable(s => s.Height("auto").Enabled(false))
- .Sortable(s => s.Enabled(false))
- .Pageable(p => p.Enabled(false))
- .Filterable(f => f.Enabled(false))
- .BindTo(Model.OrderLines.Where(x => x.LocationCode == null))
- .Columns(columns =>
- {
- columns
- .Bound(c => c.NrOfUnits);
- columns
- .Bound(c => c.ProductCode);
- columns
- .Bound(c => c.Description);
- columns
- .Bound(c => c.NrcPerUnit)
- .Format("{0:C}")
- .ClientFooterTemplate("Totaal: #=sum#");
- columns
- .Bound(c => c.MrcPerUnit)
- .Format("{0:C}")
- .ClientFooterTemplate("Totaal: #=sum#");
- columns
- .Template(f => string.Format("
€ {0:n2}", f.NrOfUnits*f.NrcPerUnit))- //.Template(c => {}).ClientTemplate("#=calculateField(data)#")
- .Title("Totaal per stuk");
- //.ClientFooterTemplate("Totaal: #=sum#");
- columns
- .Template(f => string.Format("
€ {0:n2}", f.NrOfUnits * f.MrcPerUnit))- .Title("Totaal per stuk per maand");
- }
- )
- // vanaf hier
- .DataSource(dataSource => dataSource
- .Ajax()
- .ServerOperation(false)
- .Aggregates(aggregates =>
- {
- aggregates.Add(c => c.MrcPerUnit).Sum();
- aggregates.Add(c => c.NrcPerUnit).Sum();
- })
- .Read(read => read.Action("Aggregates_Read", "Order").Data("getParameters"))
- )
- // tot hier
Soo.. How can I fix this ??? or tell me what i'm doing wrong.thnx guys .
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Cassie ModPosted Jul 12, 2016, 6:20 AM