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

ViewState error for RadGrid

0 Answers 165 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mandy
Top achievements
Rank 1
Mandy asked on 11 Jul 2012, 12:40 PM
Hi,

I am working on one simple ASP.Net page which has very few controls (textbox, combo box and search button) apart from two separate Radgrid controls. 

I am attaching data coming from WCF service after hitting Search button. The data coming from WCF is also correct and comparatively small in size. (15 -20 records at the max).

This scenario is works for other pages on the application except one page, I am getting following JavaScript error while loading ViewState-  Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Failed to load viewstate.  The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

So I managed to display data by using following settings

EnableViewState="true" ViewStateMode="Disabled".

But the issue is I want to use inline edit mode for insert and some other events are also not fired with disabled viewstate.

I would like to know what might go wrong with the radGrid and i am getting the above error?
This behavior is not observed on other ASP.Net pages on the site.

During testing, i just binded data to simple code like
<rad:RadGrid ID="grAccruals" runat="server" /> and got view state error
and I am able to display data with
<rad:RadGrid ID="grAccruals" runat="server" EnableViewState="true" ViewStateMode="Disabled"/>

Can anybody help me on debugging this issue? Which area I should look for to enable view state?

Thanks in advanced.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Mandy
Top achievements
Rank 1
Share this question
or