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

RadDocking looses state of contained controls such as RadGridView

1 Answer 101 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Steve Hulse
Top achievements
Rank 1
Steve Hulse asked on 13 Oct 2011, 04:57 PM
I have an application that uses RadDocking to host a RadGridView control.  When the application initially loads the grid's databinding, sorting, filtering, grouping, etc. work fine.  However, if the pane containing the RadGridView control is pinned, unpinned, or floated all user customizations to the grid such as sorting and filtering are lost.  It appears that the the grid is reinstantiated when the user performs any of these actions.  I have set IsContentPreserved to True in the RadPaneGroup that hosts the RadGridView, but the grid's state is still not preserved.  Is there a way to preserve state in this scenario?

 

 

 

<telerik:RadDocking HasDocumentHost="False" Grid.Row="2" PreviewUnpin="RadDocking_PreviewUnpin">
    <telerik:RadSplitContainer InitialPosition="DockedBottom">
        <telerik:RadPaneGroup IsContentPreserved="True">
            <telerik:RadPane
                Header="Grid"
                CanFloat="False"
                CanUserClose="False"
                ContextMenuTemplate="{x:Null}">
                   <Grid>
                    <telerik:RadGridView AutoGenerateColumns="False" SelectionMode="Multiple" RowIndicatorVisibility="Collapsed" ItemsSource="{Binding}" IsReadOnly="True" SelectionUnit="Cell">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewSelectColumn Width="20"/>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=InventoryDate, Mode=OneWay}" Header="Inventory Date" DataFormatString="{}{0:MM/dd/yyyy}"/>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=BridgeNumber, Mode=OneWay}" Header="Bridge #"/>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=CreatedBy, Mode=OneWay}" Header="Created By"/>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=CreatedDate, Mode=OneWay}" Header="Created Date" DataFormatString="{}{0:MM/dd/yyyy}"/>
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
                </Grid>
            </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
</telerik:RadDocking>

Thanks for any suggestions.

Steve

 

1 Answer, 1 is accepted

Sort by
0
Steve Hulse
Top achievements
Rank 1
answered on 14 Oct 2011, 04:29 PM
Tags
Docking
Asked by
Steve Hulse
Top achievements
Rank 1
Answers by
Steve Hulse
Top achievements
Rank 1
Share this question
or