Resetting layout

3 posts, 0 answers
  1. Sam
    Sam avatar
    103 posts
    Member since:
    Feb 2009

    Posted 12 May 2009 Link to this post

    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. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 12 May 2009 Link to this post

    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.
  3. Sam
    Sam avatar
    103 posts
    Member since:
    Feb 2009

    Posted 12 May 2009 Link to this post

    Thanks for the quick reply.
Back to Top