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

[Solved] No ViewState RadGrid and Grouping

1 Answer 138 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nicolas
Top achievements
Rank 1
Nicolas asked on 15 Mar 2013, 07:23 PM
I present a large grid in a webpage and I wanted to disable the viewstate to make the page lighter, However, with a disabled viewstate my grouping is not kept when a postback occurs (when I drag another column header in the group panel for example).

Is there any way to keep the grouping functionality with a disabled viewstate? If so, how can it be done?

FYI : My grid's datasource is set dynamically (in the "NeedDataSource" event).

1 Answer, 1 is accepted

Sort by
0
Antonio Stoilkov
Telerik team
answered on 20 Mar 2013, 07:43 AM
Hello Nicolas,

RadGrid does not persists its GroupByExpressions collection when ViewState is disabled as stated in the help article below.

In order to achieve your scenario you could save the GridTableView.GroupByExpressions collection in a Session variable and retrieve it on every Page_Load and save it in every Page_PreRender.

Greetings,
Antonio Stoilkov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Nicolas
Top achievements
Rank 1
Answers by
Antonio Stoilkov
Telerik team
Share this question
or