Moving away from RadDockLayout?

3 posts, 1 answers
  1. Sean
    Sean avatar
    200 posts
    Member since:
    Nov 2010

    Posted 24 Jun 2011 Link to this post

    Hi all,

    My project has grown outside the scope of the functionality provided by RadDockLayout. I am hoping to create my own manager class which emulates the functionality currently provided to me by RadDockLayout. 

    So, I have classes which inherit from RadDock and RadDockZone, CormantRadDock and CormantRadDockZone. I am letting RadDockLayout manage these objects, but it is a pain to constantly have to cast my RegisteredDocks collection constantly. In addition, I do the same sort of control regeneration that RadDockLayout provides, except applied to more controls. As such, I have a firm understanding of what is needed to manage these controls.

    That being said, I would like to make sure I do not miss any hidden dependencies.

    So, I use the events for RadDockLayout_SaveDockLayout and LoadDockLayout. I believe I can just append additional code to the Page_Load method to emulate what is occurring in RadDockLayout_LoadDockLayout (please correct me if this is an incorrect belief). I am unsure of how to emulate RadDockLayout_SaveDockLayout -- and would like some advice. How can my manager trigger on this event? 

    Other than that, is there anything hidden going on that I should be aware of that would make removing RadDockLayout from a page full of dynamic RadDocks and RadDockZones?

    Thanks

    Sean
  2. Sean
    Sean avatar
    200 posts
    Member since:
    Nov 2010

    Posted 24 Jun 2011 Link to this post

    Hi,

    I made a good attempt at this and I'm working through some minor issues now. I had a question, though.

    Why is this valid when creating a new RadDock on the page:

    dockZoneToDockWith.Controls.Add(radDock);

    but this is not valid:

    radDock.Dock(dockZoneToDockWith);

    I get the error Telerik.Web.UI.WebResource.axd:15Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Page cannot be null. Please ensure that this operation is being performed in the context of an ASP.NET request.
    is it just because the dockZoneToDockWith has just been created and doesn't exist on the page yet?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Pero
    Admin
    Pero avatar
    1156 posts

    Posted 30 Jun 2011 Link to this post

    Hello Sean,

    The radDock.Dock(dockZoneToDockWith) method of the RadDock control, adds the dock to the dockZoneToDockWith.Docks collection, which afterwards is used to render each dock in the collection and register its scripts. These two actions require that the dock and the zone be added to the Controls tree, so that their Page objects are not null. That''s the sole reason for the exception.

    All the best,
    Pero
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top