OnLoadDockLayout event not firing for dynamically created docks

4 posts, 0 answers
  1. Steve
    Steve avatar
    60 posts
    Member since:
    Nov 2006

    Posted 18 Feb 2008 Link to this post

    The site that I am working on has the following setup:

    A master page is defined which contains the RadTabStrip control used by the site and one web page default.aspx that uses this master page.

    Clicking on a tab will dynamically load a user control into the content place holder on the default.aspx page. The user control is loaded by using an ajax call.

    This user control creates RadDocks dynamically (in the OnInit event of the user control, based off of the examples on the Telerik site) and adds them to 1 or 2 predefined RadDockZones. 

    The docks are setup to AutoPostBack and I am currently handing the OnDockPositionChanged event just to display information as to what dock changed position.  Using the RadAjaxManagerProxy I have added ajax settings for both the RadDockZones (if I am no longer able to move any of the docks after the first dock has been moved).

    After dropping the dock and the ajax call has completed, I see the information that is displayed in the OnDockPositionChanged event stating which dock has changed position, which RadDockZone it was moved to and its new index, but the dock still moves back to its original position.

    While debugging the application the OnSaveDockLayout event fires but the OnLoadDockEvent never fires, which is the only thing that I can think of that is causing the dock to return to it's original position.

    I hope this has made sense, and would appreciate any help that can be provided on the issue that I am having.

    Thanks
  2. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 27 Feb 2008 Link to this post

    Hello Steve,

    Could you please open a new support ticket and send us a running project, where we can observe this problem? Once we receive it we will do our best to help you.

    Sincerely yours,
    Petio Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Hetal
    Hetal avatar
    7 posts
    Member since:
    Sep 2010

    Posted 30 Apr 2013 Link to this post

    We too are facing the same issue.

    Please let us know if this is already resolved.
  5. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 30 Apr 2013 Link to this post

    Hi Hetal,

    If the RadDockLayout is loaded too late in the page lifecycle, its event LoadDockLayout may not be fired. Most probably the dock layout control is located in your dynamically loaded user controls. You need to ensure the user controls that contain the docks and possibly the dock layout are loaded not later than the Init event of the page. If there are multiple user controls each with a dock layout, you need to remove the dock layouts and create a single dock layout that will be located on your main page and will wrap all user controls with docks. There should be only one RadDockLayout that contains all docks on the page.

    If you are still having difficulties after trying the suggestion above, please check if you have completed the steps that are listed in this help article.

    Regards,
    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.
Back to Top