Delete Dynamically created RadDockZone

2 posts, 0 answers
  1. Alex
    Alex avatar
    43 posts
    Member since:
    Jun 2011

    Posted 04 Mar 2013 Link to this post

      I am creating multiple RadDockZones with a single RadDock in each zone dynamically.  I have implemented the example in the help for creating/working with dynamic RadDocks and that works fine.  However, on PostBack, I need to be able to delete and re-create the controls (for the purpose of screen layout or filtering criteria). 
      I seem to be having some odd problems that I'm guessing are related to viewstate issues since I'm creating the RadDockZones and RadDocks both in the Page Init and in the postback handler.  The zones live in a PlaceHolder and I'm just clearing the controls before re-creating them in the postback handler.
      Should I be clearing all docs and zones directly?  I see there's a way to clear the docs from a zone, but I don't see a way to clear the zones from the RadDockLayout.  Is there a method for this?
  2. Slav
    Slav avatar
    1359 posts

    Posted 07 Mar 2013 Link to this post

    Hi Alex,

    It is important that you fulfill these requirements when creating the the dynamical RadDocks:
     - The docks should be recreated on Page_Init  to ensure that their state is applied correctly;
     - When recreating the docks and their content you should use the same IDs and the layout should not be changed, otherwise the ViewState will not be applied correctly. This is valid for the RadDockZones as well if you create them programmatically.

    You can also examine the following help articles:
     - Adding Controls Inside Dynamically Created Docks;
     - Dynamically Creating RadDock Controls;

    There is not a RadDockLayout method for clearing the dock zones in its content. If your scenario includes programmatically created dock zones, you need to handle them manually.

    I hope this helps. If the problem persists, please open a support ticket and send a simple, fully runnable sample that isolates your case so that I can examine it and provide a more to the point answer.

    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