Can we add DockZone control to a page at runtime

2 posts, 0 answers
  1. Deepak
    Deepak avatar
    15 posts
    Member since:
    Jun 2010

    Posted 20 Jul 2010 Link to this post

    I have a requirment, I need to have a dropdown list which will contains values form 1 to 4.
    Based on what user selects from it, I need to add same number  Dockzone control to my page.

    I want to know is it possible to do, I did add Dock controls at the runtime and they are working fine on another page.
    But i am not sure about the dockzone controls.

  2. Petio Petkov
    Petio Petkov avatar
    825 posts

    Posted 22 Jul 2010 Link to this post

    Hello Deepak,

    You can add RadDockZones dynamically. Here it is a simple example:
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <head runat="server">
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:DropDownList ID="ddList1" runat="server" AutoPostBack="true" 
            <asp:ListItem Text="1" Value="1"></asp:ListItem>
            <asp:ListItem Text="2" Value="2"></asp:ListItem>
            <asp:ListItem Text="3" Value="3"></asp:ListItem>
            <asp:ListItem Text="4" Value="4"></asp:ListItem>
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
           <asp:Panel ID="Panel1" runat="server"></asp:Panel>
    protected void ddList1_SelectedIndexChanged(object sender, EventArgs e)
           int zonesCount = int.Parse(ddList1.SelectedValue);
           for (int i = 0; i < zonesCount; i++)
               RadDockZone zone = new RadDockZone();
               zone.ID = "RadDockZone" + i.ToString();

    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. DevCraft R3 2016 release webinar banner
Back to Top