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

Resetting layout

2 Answers 63 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Sam
Top achievements
Rank 1
Sam asked on 12 May 2009, 01:37 PM
How can I reset the layout on a button click? I need to be able to bring back closed and collapsed Docks, I have everything coming from the database (state and controls). I tried clearing out the state per that user but I think I need to do it in a different lifecycle event because it keeps coming back. The reset layout sub just clears out that users record and therefore returns a default state but somehow it goes back to the original, I assume I need to do it in a different event?

Here is the code

  Protected Sub Button2_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles Button2.Click 
        Dim ContactID As Integer = Int32.Parse(Utilities.GetSession("ContactNumber").ToString()) 
        PortalDataAccess.ResetLayoutByContactID(ContactID) 
    End Sub 

2 Answers, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 12 May 2009, 04:06 PM
Hello Sam,

You can find a simple example where the RadDockLayout could be reset here:
http://demos.telerik.com/aspnet-ajax/dock/examples/myportal/defaultcs.aspx
The example use a flag(_dockStateCleared) which is set in ButtonClear_Click handler. In the   RadDockLayout1_SaveDockLayout handler the correct action is executed depending on the flag value.

Greetings,
Petio Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Sam
Top achievements
Rank 1
answered on 12 May 2009, 04:16 PM
Thanks for the quick reply.
Tags
Dock
Asked by
Sam
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Sam
Top achievements
Rank 1
Share this question
or