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 Events


 
RadDock1
 
 
RadDock1
 
     
 
RadDock2
 
 
RadDock2
 
     
Clear log Event log:

  • Client-Side Events

    The RadDock controls provide the following client-side events:

    • OnClientDragStart - fires before RadDock is dragged
    • OnClientDrag - fires while RadDock is being dragged
    • OnClientDragEnd - fires after RadDock was dragged
    • OnClientCommand - fires when any of the commands of RadDock was clicked
    • OnClientDockPositionChanging - fires when RadDock is being moved
    • OnClientDockPositionChanged - fires after RadDock was moved
    • OnClientResizeStart - fires when RadDock's resizing has started
    • OnClientResizeEnd - fires when RadDock's resizing has finished

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.ClientSideEvents.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[
            /**********************************************************
                                    Dock Events
            **********************************************************/
            
            function OnClientDragStart(sender, eventArgs)
            {
                logEvent("You started dragging RadDock with ID " + sender.get_id() + ".");
            }
            
            function OnClientDragEnd(sender, eventArgs)
            {
                logEvent("You finished dragging RadDock with ID " + sender.get_id() + ".");
            }
            
            function OnClientDrag(sender, eventArgs)
            {
                logEvent("You are dragging RadDock with ID " + sender.get_id() + ".");
            }
            
            function OnClientDockPositionChanged(sender, eventArgs)
            {
                logEvent("You moved RadDock with ID " + sender.get_id() + ".");
            }
            
            function OnClientDockPositionChanging(sender, eventArgs)
            {
                logEvent("You are moving RadDock with ID " + sender.get_id() + ".");
            }
            
            function OnClientCommand(sender, eventArgs)
            {
                logEvent("You clicked " + eventArgs.Command.get_name() + " on RadDock with ID " + sender.get_id() + ".");
            }
            
            function OnClientResizeStart(sender, eventArgs)
            {
                logEvent("You started resizing RadDock with ID " + sender.get_id() + ".");
            }
            
            function OnClientResizeEnd(sender, eventArgs)
            {
                logEvent("You finished resizing RadDock with ID " + sender.get_id() + ".");
            }
            
            //]]>
            </script>
            <telerik:RadScriptManager id="ScriptManager" runat="server">
            </telerik:RadScriptManager>
            
            <br />
            <telerik:raddocklayout id="RadDockLayout1" runat="server">
                <table>
                    <tr>
                        <td>
                            <telerik:raddockzone id="RadDockZone1" runat="server" minheight="200" width="300">
                                <telerik:raddock id="RadDock1" runat="server"
                                    onclientcommand="OnClientCommand" onclientdockpositionchanged="OnClientDockPositionChanged"
                                    onclientdockpositionchanging="OnClientDockPositionChanging" onclientdrag="OnClientDrag"
                                    onclientdragend="OnClientDragEnd" onclientdragstart="OnClientDragStart"
                                    onclientresizestart="OnClientResizeStart" onclientresizeend="OnClientResizeEnd" resizable="true"
                                    title="RadDock1" text="RadDock1">
                                </telerik:raddock>
                                <telerik:raddock id="RadDock2" runat="server" onclientcommand="OnClientCommand"
                                    onclientdockpositionchanged="OnClientDockPositionChanged" defaultcommands="All"
                                    onclientdockpositionchanging="OnClientDockPositionChanging" onclientdrag="OnClientDrag"
                                    onclientdragend="OnClientDragEnd" onclientdragstart="OnClientDragStart" resizable="true"
                                    onclientresizestart="OnClientResizeStart" onclientresizeend="OnClientResizeEnd" text="RadDock2"
                                    title="RadDock2">
                                </telerik:raddock>
                            </telerik:raddockzone>
                        </td>
                        <td>
                            <telerik:raddockzone id="RadDockZone2" runat="server" minheight="200" width="300">
                            </telerik:raddockzone>
                        </td>
                    </tr>
                </table>
            </telerik:raddocklayout>
            <qsf:EventLogConsole ID="EventLogConsole1" runat="server" AllowClear="true" />
            <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