We are trying to basically and literally group data in a data source like you can do with SQL when selecting against a table.
So I get data that looks like the following:
var grid = $("#grid").kendoGrid({
dataSource: {
data: [
{f1: "1", f2:"2", f3:"3", f4:"4", f5:"5", f6: "1"},
{f1: "1", f2:"2", f3:"3", f4:"4", f5:"5", f6: "3"},
{f1: "1", f2:"2", f3:"3", f4:"6", f5:"7", f6: "2"},
{f1: "1", f2:"2", f3:"3", f4:"6", f5:"7", f6: "1"},
{f1: "1", f2:"2", f3:"3", f4:"6", f5:"5", f6: "2"}
]},
}).data("kendoGrid");
We want to group by f1, f2, f3, f4 and sum on f6.
The result when we show this data in a grid or list view should be that the data source has only 2 rows in it
{f1: "1", f2:"2", f3:"3", f4:"4", sum: "4"},
{f1: "1", f2:"2", f3:"3", f4:"6", sum: "5"},
We do not want group header and so forth, just to literally group the data.
How can I accomplish this?
So I get data that looks like the following:
var grid = $("#grid").kendoGrid({
dataSource: {
data: [
{f1: "1", f2:"2", f3:"3", f4:"4", f5:"5", f6: "1"},
{f1: "1", f2:"2", f3:"3", f4:"4", f5:"5", f6: "3"},
{f1: "1", f2:"2", f3:"3", f4:"6", f5:"7", f6: "2"},
{f1: "1", f2:"2", f3:"3", f4:"6", f5:"7", f6: "1"},
{f1: "1", f2:"2", f3:"3", f4:"6", f5:"5", f6: "2"}
]},
}).data("kendoGrid");
We want to group by f1, f2, f3, f4 and sum on f6.
The result when we show this data in a grid or list view should be that the data source has only 2 rows in it
{f1: "1", f2:"2", f3:"3", f4:"4", sum: "4"},
{f1: "1", f2:"2", f3:"3", f4:"6", sum: "5"},
We do not want group header and so forth, just to literally group the data.
How can I accomplish this?