I have a VM has a DataSource in it.
When new data arrives, I am able to populate the LayerTable with the data() function. But I also want to dynamically add in aggragates to this.
I am finding that when I later try to get the aggregates() I get an empty object.
var layerTable = new kendo.data.DataSource();
1.
vm.SetLayers = function(values) {
2.
this.LayerTable.data(values);
3.
this.LayerTable.aggregate = [{ field: "FileCount", aggregate: "count" }];
4.
//this.trigger("change", { field: "LayerTable" });
5.
};
1.
vm.LayerTable.aggregates();