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

Delete Dynamically created RadDockZone

1 Answer 39 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 04 Mar 2013, 05:33 PM
  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?

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 07 Mar 2013, 11:10 AM
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.

Greetings,
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.
Tags
Dock
Asked by
Alex
Top achievements
Rank 1
Answers by
Slav
Telerik team
Share this question
or