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

RadDockLayout not storing layout state

2 Answers 102 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Venkata
Top achievements
Rank 1
Venkata asked on 19 Dec 2011, 07:41 AM
Hi - I have a raddock that is not retaining its state after a postback.
Scenario: I expand the dock, do some operation that triggers a postback, and when the page loads again, the dock is collapsed.
Expected: I want the dock to retain state, and load expanded.

I was using rad controls version 2009.1.402.20 and this was behaving fine. I'm currently updating to version 2011.3.1115.35 and I'm facing this problem.

Here's a sample of the code that I'm using -

<telerik:RadDockLayout runat="server" ID="[DUMMYID-1]">
    <telerik:RadDockZone runat="server" ID="[DUMMYID-2]" Orientation="vertical" Skin="Vista" Width="99.7%">
        <telerik:RadDock runat="server" ID="[DUMMYID-3]Title="More"
            Style="min-height0pxmargin0px autovisibilityhidden;" Collapsed="true"
            DefaultCommands="ExpandCollapse" Skin="Vista" EnableDrag="false"
            DockHandle="None" Width="99.5%" BorderStyle="None">
            <ContentTemplate>
             ...... [some code here]
            </ContentTemplate>
    </telerik:RadDock>
</telerik:RadDockZone>

I tried adding the following to the raddocklayout attributes but this doesn't help. 
EnableViewState="true" StoreLayoutInViewState="true"

Appreciate any help. Thanks.

ps: Also if you could point to me some documentation that would help me migrate from older version to newer version of rad controls for asp.net ajax.

2 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 20 Dec 2011, 04:00 PM
Venkata:

In case you missed it, here's a link to the "Updating RadControls for ASP.NET AJAX to another version or license" documentation.

Cheers!
0
Slav
Telerik team
answered on 21 Dec 2011, 02:10 PM
Hi Venkata,

Note that when RadDock controls are wrapped in a RadDockLayout, their layout is automatically saved through postback. You can find attached a sample project, demonstrating this behavior. If you want to persist the state of the RadDocks when the page is closed and opened again, you can utilize the events SaveDockLayout and LoadDockLayout of RadDockLayout in order to save the layout in a database, Session or another storage medium of your choosing. The online demo Dock / Load/Save Layout shows a possible approach for achieving such functionality.

The safest way to ensure that your version of the RadControls is updated successfully is to uninstall the old one and to use the automatic installer in order to setup the desired release.  If you have added references to a telerik assemblies in GAC, remove them and then the new one will be added by the installer of the latest version. You can make sure the correct version is installed by checking the Telerik.Web.UI.dll in the Bin directory of your project.

You can also refer to the following help article, which explain the process of updating the RadControls for ASP.NET AJAX in detail:
Upgrading RadControls Trial to RadControls Developer license or newer version

Also, I would suggest checking the following forum thread as all existing skins, except Default, are moved to a separate skins assembly since Q3 2011:
Separate Skin Assembly in RadControls for ASP.NET AJAX with Q3 2011

All the best,
Slav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Dock
Asked by
Venkata
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Slav
Telerik team
Share this question
or