Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Dock / Client-side API


 
RadDock1
 
 
RadDock1
 
     
 
RadDock2
 
 
RadDock2
 
     
 
RadDock3
 
 
RadDock3
 
     
 
RadDock4
 
 
RadDock4
 
     
 
RadDock5
 
 
RadDock5
 
     
 
RadDock6
 
 
RadDock6
 
     

  • Client-Side API

    RadDock provides a rich client-side API.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="vb" AutoEventWireup="true" CodeFile="DefaultVB.aspx.vb" Inherits="Telerik.Web.Examples.Dock.ClientSideAPI.DefaultVB" %>

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <%@ Register Namespace="Telerik.QuickStart" TagPrefix="qsf" %>
    <%@ Register Src="~/Common/Header.ascx" TagName="Header" TagPrefix="qsf" %>
    <%@ Register Src="~/Common/HeadTag.ascx" TagName="HeadTag" TagPrefix="qsf" %>
    <%@ Register Src="~/Common/Footer.ascx" TagName="Footer" TagPrefix="qsf" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <qsf:HeadTag ID="Headtag1" runat="server" />
    </head>
    <body class="BODY">
        <form id="Form1" runat="server" method="post">
        <qsf:Header ID="Header1" runat="server" NavigationLanguage="VB" />

        <script type="text/javascript">
            //<![CDATA[
            function ShowHideRadDock1()
            {
                var dock = $find('<%= RadDock1.ClientID %>');
                var isClosed = dock.get_closed();
                dock.set_closed(!isClosed);
            }

            function DockRadDock1ToRightZone()
            {
                var leftZone = $find('<%= RadDockZone2.ClientID %>');
                var dock = $find('<%= RadDock1.ClientID %>');

                if (dock && leftZone && dock.get_parent().get_id() != "RadDockZone2")
                {
                    leftZone.dock(dock, 2);
                }
            }

            function CollapseExpandRadDock1()
            {
                var dock = $find('<%= RadDock1.ClientID %>');
                if (dock)
                {
                    var isCollapsed = !dock.get_collapsed();
                    dock.set_collapsed(isCollapsed);
                }
            }

            function MoveAllDocksToLeftZone()
            {
                var rightZone = $find('<%= RadDockZone2.ClientID %>');
                var leftZone = $find('<%= RadDockZone1.ClientID %>');
                var numberDocksInRightZone = rightZone.get_docks().length;
                var docksArray = rightZone.get_docks();

                for (var i = 0; i < numberDocksInRightZone; i++)
                {
                    leftZone.dock(docksArray[i]);
                }

            }
            //]]>
        </script>

        <telerik:RadScriptManager ID="ScriptManager" runat="server">
        </telerik:RadScriptManager>
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="Buttons" />
        <br />
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
            <table>
                <tr>
                    <td style="vertical-align: top">
                        <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="200" Width="300"
                            Skin="Outlook">
                            <telerik:RadDock ID="RadDock1" runat="server" Text="RadDock1" Title="RadDock1" Height="70"
                                EnableRoundedCorners="true">
                            </telerik:RadDock>
                            <telerik:RadDock ID="RadDock2" runat="server" DefaultCommands="All" Text="RadDock2"
                                Title="RadDock2" Height="70" EnableRoundedCorners="true">
                            </telerik:RadDock>
                            <telerik:RadDock ID="RadDock3" runat="server" DefaultCommands="All" Text="RadDock3"
                                Title="RadDock3" Height="70" EnableRoundedCorners="true">
                            </telerik:RadDock>
                        </telerik:RadDockZone>
                    </td>
                    <td style="vertical-align: top">
                        <telerik:RadDockZone ID="RadDockZone2" runat="server" MinHeight="200" Width="300"
                            Skin="Outlook">
                            <telerik:RadDock ID="RadDock4" runat="server" Text="RadDock4" Title="RadDock4" Height="70"
                                EnableRoundedCorners="true">
                            </telerik:RadDock>
                            <telerik:RadDock ID="RadDock5" runat="server" DefaultCommands="All" Text="RadDock5"
                                Title="RadDock5" Height="70" EnableRoundedCorners="true">
                            </telerik:RadDock>
                            <telerik:RadDock ID="RadDock6" runat="server" DefaultCommands="All" Text="RadDock6"
                                Title="RadDock6" Height="70" EnableRoundedCorners="true">
                            </telerik:RadDock>
                        </telerik:RadDockZone>
                    </td>
                </tr>
                <tr>
                    <td style="height: 30px">
                    </td>
                    <td>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input id="dockButton" onclick="DockRadDock1ToRightZone()" type="button" value="Move RadDock1 To Right Zone"
                            style="width: 250px;" />
                    </td>
                    <td>
                        <input id="moveAllButton" onclick="MoveAllDocksToLeftZone()" type="button" value="Move All Docks To Left Zone"
                            style="width: 250px;" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <input id="collapseExpandButton" onclick="CollapseExpandRadDock1()" type="button"
                            style="width: 250px;" value="Collapse/Expand RadDock1" />
                    </td>
                    <td>
                        <input id="showHideButton" onclick="ShowHideRadDock1()" type="button" value="Show/Hide RadDock1"
                            style="width: 250px;" />
                    </td>
                </tr>
            </table>
        </telerik:RadDockLayout>
        <qsf:Footer ID="Footer1" runat="server" ShowCodeViewer="true" />
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451