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

Can we add DockZone control to a page at runtime

1 Answer 46 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Deepak asked on 20 Jul 2010, 10:46 AM
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.

1 Answer, 1 is accepted

Sort by
Petio Petkov
Telerik team
answered on 22 Jul 2010, 03:19 PM
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
Asked by
Top achievements
Rank 1
Answers by
Petio Petkov
Telerik team
Share this question