New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Forbidden Zones

RadDockZone1 

RadDock1
  • Collapse
  • Close
AllowedZones are:
RadDockZone1 and RadDockZone3
RadDock2
  • Collapse
  • Close
AllowedZones are:
RadDockZone1 and RadDockZone4

RadDockZone2

RadDockZone3

RadDock3
  • Collapse
  • Close
ForbiddenZones are:
RadDockZone2 and RadDockZone4
RadDock4
  • Collapse
  • Close
The ForbiddenZones property is not set. The object can be moved around all Docking Zones.

RadDockZone4

The ForbiddenZones property of the RadDock is used to set the RadDockZones in which RadDock cannot be docked.

The AllowedZones property of the RadDock is used to set the RadDockZones in which RadDock can be docked.

  • DefaultCS.aspx
<%@ Page Language="C#" AutoEventWireup="true"  %>

<!DOCTYPE html>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
    <title>Telerik ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
    <div class="demo-container size-medium">
        <telerik:RadDockLayout runat="server" ID="RadDockLayout1">
            <table>
                <tr>
                    <td style="width: 280px">
                        <p>
                            RadDockZone1&nbsp;
                        </p>
                        <telerik:RadDockZone runat="server" ID="RadDockZone1" Orientation="Vertical" MinHeight="200px"
                            Width="280px">
                            <telerik:RadDock RenderMode="Lightweight" ID="RadDock1" Title="RadDock1" runat="server" Width="280px" AllowedZones="RadDockZone1,RadDockZone3"
                                DockMode="Docked" Text="<span style='color:Green;font-weight:bold;'>AllowedZones</span> are:<br/> <strong>RadDockZone1</strong> and <strong>RadDockZone3</strong>">
                            </telerik:RadDock>
                            <telerik:RadDock RenderMode="Lightweight" ID="RadDock2" Title="RadDock2" runat="server" Width="280px" AllowedZones="RadDockZone1,RadDockZone4"
                                DockMode="Docked" Text="<span style='color:Green;font-weight:bold;'>AllowedZones</span> are:<br/> <strong>RadDockZone1</strong> and <strong>RadDockZone4</strong>">
                            </telerik:RadDock>
                        </telerik:RadDockZone>
                    </td>
                    <td style="width: 280px">
                        <p>
                            RadDockZone2<br />
                        </p>
                        <telerik:RadDockZone runat="server" ID="RadDockZone2" Orientation="Vertical" MinHeight="200px"
                            Width="280px">
                        </telerik:RadDockZone>
                    </td>
                </tr>
            </table>
            <div style="padding: 5px 0 5px 0">
            </div>
            <table>
                <tr>
                    <td style="width: 280px">
                        <p>
                            RadDockZone3
                        </p>
                        <telerik:RadDockZone runat="server" ID="RadDockZone3" Orientation="Vertical" MinHeight="200px"
                            Width="280px">
                            <telerik:RadDock RenderMode="Lightweight" ID="RadDock3" Title="RadDock3" runat="server" Width="280px" ForbiddenZones="RadDockZone2,RadDockZone4"
                                DockMode="Docked" Text="<span style='color:Red;font-weight:bold;'>ForbiddenZones</span> are:<br/> <strong>RadDockZone2</strong> and <strong>RadDockZone4</strong>">
                            </telerik:RadDock>
                            <telerik:RadDock RenderMode="Lightweight" ID="RadDock4" Title="RadDock4" runat="server" Width="280px" DockMode="Docked"
                                Text="The <span style='color:Red;font-weight:bold;'>ForbiddenZones</span> property is not set. The object can be moved around all Docking Zones.">
                            </telerik:RadDock>
                        </telerik:RadDockZone>
                    </td>
                    <td style="width: 280px">
                        <p>
                            RadDockZone4
                        </p>
                        <telerik:RadDockZone runat="server" ID="RadDockZone4" Orientation="Vertical" MinHeight="200px"
                            Width="280px">
                        </telerik:RadDockZone>
                    </td>
                </tr>
            </table>
        </telerik:RadDockLayout>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance