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

Dynamic controls in RadDock not adding within the dock area

2 Answers 80 Views
Dock
This is a migrated thread and some comments may be shown as answers.
blue
Top achievements
Rank 1
blue asked on 13 Aug 2010, 10:03 AM
Is there a way to add dynamic controls in the RadDock?

I am trying to add dynamic controls in a raddock, but unfortunately the controls I added are not put inside the dock area, but below it.

So in my example, I have created a label, "Tempo", inside my raddock during design time.

During page_init, I tried adding more labels with values of "Ant", "Baboon", "Cat", "Dinosaur"..., but all of them are created not inside the colored area of the dock.

Why is this happening? Is there a way to get my dynamic controls within the (colored) area of the dock?

I have attached the screenshot of the output.

2 Answers, 1 is accepted

Sort by
0
Petio Petkov
Telerik team
answered on 13 Aug 2010, 05:11 PM
Hi,

You should use RadDock.ContentContainer's Controls collection,e.g.
RadDock4.ContentContainer.Controls.Add(new Button());

You can find a simple example, which illustrates how to add dynamically controls to RadDock here:
http://demos.telerik.com/aspnet-ajax/dock/examples/content/defaultcs.aspx

All the best,
Petio Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
blue
Top achievements
Rank 1
answered on 16 Aug 2010, 03:39 AM
Thanks. It worked!
Tags
Dock
Asked by
blue
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
blue
Top achievements
Rank 1
Share this question
or