This is a migrated thread and some comments may be shown as answers.

How to set grid grouping programatically

2 Answers 2810 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hennie
Top achievements
Rank 1
Hennie asked on 12 Feb 2013, 01:36 PM
Good day,

I have the following scenario:
By default, the grid on my page loads data that is grouped by 4 fields.

The user has the ability to add or remove a grouping if he chooses to. I want to have a button on my page that resets the view to how it was when the page loaded, with the data grouped by the 4 fields.

I want to do this without reloading the page itself, because the call that returns the data takes too long unfortunately. How do I programatically group by a certain field (or group of fields) on the click of the reset button?

Anyone have any ideas?

2 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 13 Feb 2013, 08:42 AM
Hi Hennie,

In order group the DataSource data, you should use its group method

Greetings,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Hennie
Top achievements
Rank 1
answered on 13 Feb 2013, 09:08 AM
Thank you, that works 100%, I don't know how I missed that method in the documentation.
Tags
Grid
Asked by
Hennie
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Hennie
Top achievements
Rank 1
Share this question
or