Dynamic controls in RadDock not adding within the dock area

3 posts, 0 answers
  1. blue
    blue avatar
    3 posts
    Member since:
    Jul 2010

    Posted 13 Aug 2010 Link to this post

    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. Petio Petkov
    Admin
    Petio Petkov avatar
    825 posts

    Posted 13 Aug 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. blue
    blue avatar
    3 posts
    Member since:
    Jul 2010

    Posted 15 Aug 2010 Link to this post

    Thanks. It worked!
Back to Top