I am not sure that I understand what functionality the provided code should achieve. When the groupable option is enabled for the Kendo UI Grid user is allowed to drag and drop specific column to the drop zone in order to group the Kendo UI Grid by this column. This functionality works fine with the provided sample code (please refer to the screen cast).
On the other if the main goal is to group the Kendo UI Grid programatically (on button click for example) then the Kendo UI DataSource API should be used and specifically the group method. This is required since all operations such grouping, filtering and etc are performed on DataSource level.
The following articles might be helpful resource to learn more about the Kendo UI DataSource:
- DataSource Overview.
- dataSource filed of the Kendo UI Grid widget holds a reference to the underlying Kendo UI DataSource object.
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI