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

How to disable the RadGrid control state?

1 Answer 171 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pooya
Top achievements
Rank 1
Pooya asked on 13 Jun 2011, 10:25 AM
I have built a RadGrid control programmtically in Page_Init.

The radgrid will be recreated if user has chosen some settings (e.g. drop down list) on the page.

But when I rebuild the RadGrid on Page_Init it maintains its previous state and doesn't apply the changes.

I think On Page_LoadViewState it overwrites the newly created radgrid.

I can't disable viewstate for the whole page; how could I disable it for the RadGrid only?

I have set the ViewStateMode of the RadGridControl and the MasterTableView to "Disabled" but still it loads the previous data:

<MasterTableView ViewStateMode="Disabled">

Many thanks,

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 16 Jun 2011, 09:01 AM
Hello Pooya,

You can wrap the RadGrid within an ASP.NET Panel and disable its ViewState. Other than this, you can also examine the following help topic:
Changing the grid structure dynamically on postback

Kind regards,
Daniel
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Pooya
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or