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

RadDock - dock can be dragged infinitely

1 Answer 23 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 10 May 2011, 06:22 AM
Hi,
I've been developing project using the RadDock control and have just noticed, when a user drags a dock, it can be dragged infinitely to the right or to the bottom of the page. I tried it on your demo page and saw the same thing - try it. Go here: http://demos.telerik.com/aspnet-ajax/dock/examples/default/defaultcs.aspx
Pick up one of the docks and drag your mouse out to the right...it just keeps going. Is there a way to stop this, so that it won't allow dragging outside the width or height of the main dock area? 

Thanks

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 11 May 2011, 09:14 AM
Hello Ryan,

You could try placing the docking layout in an <iframe/> as shown in this demo: RTL demo, or disable the auto scrolling with a bit of JavaScript code as shown below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="RadScriptManager1" runat="server">
    </asp:ScriptManager>
    <script type="text/javascript">
        function OnClientInitialize(dock, args)
        {
            dock._resizeExtender._autoScrollEnabled = false;
        }
 
    </script>
    <div>
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
            <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="300px" Width="300px">
                <telerik:RadDock ID="RadDock1" runat="server" Title="RadDock-Title" Width="300px"
                    OnClientInitialize="OnClientInitialize" Height="300px">
                    <ContentTemplate>
                        Dock's Content
                    </ContentTemplate>
                </telerik:RadDock>
            </telerik:RadDockZone>
        </telerik:RadDockLayout>
    </div>
    </form>
</body>
</html>

Kind regards,
Pero
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Dock
Asked by
Ryan
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or