Dock Command to move Dock control arround

2 posts, 0 answers
  1. Michael
    Michael avatar
    1 posts
    Member since:
    Dec 2008

    Posted 30 Jul 2013 Link to this post


    Is it possible to use a new Dock command to drag and drop the dock control instead of the dock's control tool bar ?

  2. Slav
    Slav avatar
    1359 posts

    Posted 02 Aug 2013 Link to this post

    Hello Michael,

    You can add a custom command in the RadDock and configure its HTML element as a custom drag handle for the control. Please check the following code sample for a reference:
    <script type="text/javascript">
        function SetHandleDock(dock, args) {
            var dockElement = dock.get_element();
            var dragHandle = $telerik.$(dockElement).find(".rdCustom")[0];
    <telerik:RadDockLayout runat="server" ID="RadDockLayout1">
        <table style="width: 757px; height: 352px;">
                <td style="padding-top: 20px; vertical-align: top;">
                    <telerik:RadDockZone runat="server" ID="RadDockZone1"
                        Orientation="Vertical" MinHeight="300px" Width="200px">
                        <telerik:RadDock ID="RadDock1" Title="RadDock2" runat="server" Width="200px" OnClientInitialize="SetHandleDock">
                                <div style="padding: 11px; text-align: center;">
                                    <img id="Handle_RadDock2" alt="Image" src="Img/drag.gif" style="cursor: move;" /><br />
                                    You can drag this object using the image above.
                                <telerik:DockCommand Text="Drag" />

    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top