Hi everyone, I searched for a long time for that issue, and that's why I am telling the solutions to everyone.
We need to enable and disable grouping dynamically.
Also, when grouping is enable, we need to change the pageSize because grouping doesn't work well with small page size if your data cover more than 1 page.
These are the non-working solutions:
grid1.setOptions({groupable:
false
/
true
, pageable: {pageSize: xyz}});
grid1.setOptions({groupable:
false
/
true
, dataSource: {pageSize: xyz}});
That is the working solution: (you absolutely need to set BOTH)
grid1.setOptions({groupable:
false
/
true
, pageable: {pageSize: xyz}, dataSource: {pageSize: xyz}});
If you call
grid1.setOptions({groupable:
true
/
false
});
grid1.dataSource.pageSize(xyz);
If you really want to do that "1 shot", you need to set both.
You can test it there: http://dojo.telerik.com/aJEkA/6
Maybe Kendo can fix the setOptions to check if the "other" variable needs to be updated as well, to make it work like dataSource.pageSize() method.