Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1940
ViewState is corrupted.
posted

Hello,

I have 2 pages, both load their controls dynamically.

each page loads a few controls, one of these controls contains a WebDataGrid bound to test data, setting DataSource to a manually filled list.

Those 2 controls with WebDataGrid are not the same control, but they are actually technically equal.

At Page 1 everyhting works fine.

At Page 2 any time a postback occurs I get the following exception:

 

Infragistics.Web.UI.GridControls.Behaviors ViewState is corrupted.

   bei Infragistics.Web.UI.Framework.ObjectCollection.LoadViewStateItems(ArrayList itemList)

 

   bei Infragistics.Web.UI.Framework.ObjectCollection.LoadViewState(Object savedState)

   bei Infragistics.Web.UI.Framework.ObjectCollection.System.Web.UI.IStateManager.LoadViewState(Object savedState)

   bei Infragistics.Web.UI.GridControls.WebDataGrid.LoadViewState(Object savedState)

   bei System.Web.UI.Control.LoadViewStateRecursive(Object savedState)

   bei System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)

   bei System.Web.UI.Control.LoadViewStateRecursive(Object savedState)

   bei System.Web.UI.Control.AddedControl(Control control, Int32 index)

   bei System.Web.UI.ControlCollection.Add(Control child)

   bei Binner.ProjectManager.GraphicalUserInterface.Classes.ContentPage.LoadPageControls(BaseElement baseElement) in N:\ProjectManager\Binner.ProjectManager.GraphicalUserInterface\Classes\ContentPage.cs:Zeile 170.

   bei Binner.ProjectManager.GraphicalUserInterface.Classes.ContentPage.OnLoad(EventArgs e) in N:\ProjectManager\Binner.ProjectManager.GraphicalUserInterface\Classes\ContentPage.cs:Zeile 47.

   bei Binner.ProjectManager.GraphicalUserInterface.Pages.Workplace.Dependencies.OnLoad(EventArgs e) in N:\ProjectManager\Binner.ProjectManager.GraphicalUserInterface\Pages\Workplace\Dependencies.aspx.cs:Zeile 40.

   bei System.Web.UI.Control.LoadRecursive()

   bei System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

 

 

nothing special in the aspx:

Part of Page 1:

 

    <tr>

        <td colspan="3">

            <igmisc:WebPanel ID="WebPanel1" runat="server" SkinID="ContentWebPanel" Header-Text="<%$ Resources:Lang, WorkplaceRecordsControl_recordRegistrationWebPanel %>"

                Header-TextAlignment="Left">

                <Header Text="WorkplaceRecordsControl_recordRegistrationWebPanel" TextAlignment="Left">

                </Header>

                <Template>

                    <ig:WebDataGrid ID="recordRegistrationDataGrid" runat="server" SkinID="WebDataGrid" AutoGenerateColumns="False">

                        <Columns>

                            <ig:BoundDataField DataFieldName="Date" Key="Date">

                                <Header Text="Date" />

                            </ig:BoundDataField>

                            <ig:BoundDataField DataFieldName="Duration" Key="Duration">

                                <Header Text="Duration" />

                            </ig:BoundDataField>

                            <ig:BoundDataField DataFieldName="Description" Key="Description">

                                <Header Text="Description" />

                            </ig:BoundDataField>

                        </Columns>

                    </ig:WebDataGrid>

                </Template>

            </igmisc:WebPanel>

        </td>

    </tr>

 

Part of Page 2 (Erroring):

 

        <tr>

            <td colspan="3">

                <ig:WebDataGrid ID="webDataGridProjectDependencies" runat="server" 

                    SkinID="WebDataGrid" AutoGenerateColumns="False">

                    <Columns>

                        <ig:BoundDataField DataFieldName="Predecessor" Key="Predecessor">

                            <Header Text="Predecessor" />

                        </ig:BoundDataField>

                        <ig:BoundDataField DataFieldName="PSP" Key="PSP">

                            <Header Text="PSP" />

                        </ig:BoundDataField>

                        <ig:BoundDataField DataFieldName="RelationType" Key="RelationType">

                            <Header Text="RelationType" />

                        </ig:BoundDataField>

                        <ig:BoundDataField DataFieldName="Offset" Key="Offset">

                            <Header Text="Offset" />

                        </ig:BoundDataField>

                    </Columns>

                </ig:WebDataGrid>

            </td>

        </tr>

 

The exception occurs right after I add another control into the control with Controls.AddAt(0, control) int he OnInit() override. (removing this does not help)

So I suspect while trying to load ViewState in LoadViewState() (not overridden) the exception is thrown.

(setting "EnableViewState" = "Disabled", of course, fixed this exception, but not my problem :-))

I am using Volume 2010.3.2134

Need help!

Thanks

Carsten

Parents Reply Children