Reputation: 537
Everything works good until serverGrouping is activated and I drag and drop some column to group data.
On javascript console the error is: e.slice is not a function.
I think that json obtained as response from ajax request has something wrong for grouped results. The real problem is that I cannot find anywhere an example about that.
At this moment I created a simple php script that returns a static array of objects:
{'results':[{'c0': 'row 0 col 0 value', 'c1': 'row 0 col 1 value'}, {'c0': 'row 1 col 0 value', 'c1': 'row 1 col 1 value'}], 'total': 20, 'group':[{field: 'c0', dir: 'asc'}]}
Group properties is initialized only if $_REQUEST has key 'group'. And grid has property schema set in this way:
schema: {
data: "results",
total: "total",
group: "group",
}
Upvotes: 1
Views: 6824
Reputation: 1570
It is possible a bug in the grid. Only way to bypass is to disable server grouping.
Upvotes: 1
Reputation: 3297
You don't need to return the data from the server in a separate property (which you've called results), as data should be contained within the group property. See http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#configuration-schema.groups.
Your code should also be groups: "group"
, not group: "group
.
Upvotes: 0