Completed
Last Updated: 14 Sep 2021 09:33 by ADMIN
ADMIN
Daniel
Created on: 01 Oct 2013 10:56
Category: Grid
Type: Bug Report
0
RadGrid Throws an Exception In Hierarchy Setup With DateTimeColumn Having PickerType Set to DateTimePicker (see description)
RadGrid throws a "Failed to load viewstate" exception in a specific setup with two level hierarchy and DateTimeColumns. 

Steps to reproduce:
1. Expand an item
2. Click on "Add new record button" in the expanded detail table view
3. Click "Cancel"
4. Click on"Add new record" this time on the master table view

Code to reproduce:

<telerik:RadGrid ID="rgComments"
    runat="server"
    AllowPaging="True"
    AutoGenerateColumns="false"
    DataSourceID="dsSpell">
    <MasterTableView Width="100%"
        CommandItemDisplay="Top" DataKeyNames="OrderID">
        <DetailTables>
            <telerik:GridTableView DataKeyNames="OrderID" DataSourceID="dsComment" Width="100%"
                runat="server" CommandItemDisplay="Top">
                <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="OrderID" MasterKeyField="OrderID"></telerik:GridRelationFields>
                </ParentTableRelation>
                <Columns>
                    <telerik:GridDateTimeColumn DataField="OrderDate" PickerType="DateTimePicker">
                    </telerik:GridDateTimeColumn>
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
            <telerik:GridDateTimeColumn DataField="OrderID" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
<br />
<asp:SqlDataSource runat="server" ID="dsComment" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
    SelectCommand="SELECT [OrderID], [OrderDate] FROM [Orders]"></asp:SqlDataSource>
<asp:SqlDataSource runat="server" ID="dsSpell" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
    SelectCommand="SELECT [OrderID], [OrderDate] FROM [Orders]"></asp:SqlDataSource>
0 comments