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

Resizing a floating dock.

2 Answers 52 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Joel
Top achievements
Rank 1
Joel asked on 11 Jun 2011, 11:50 PM
I have a two docks in a horizontal zone.

When Dock_1 undocks I force Dock_0 to resize to 100% of the width of the zone.  
This restricts the floating dock from resizing larger.  Is this by design? 

One workaround is to size Dock_0 narrower and than the floating Dock_1 can be resized larger. 

Is there a proper technique to allow my floating dock to resize at will while Dock_0 occupies 100% of the zone?


2 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 13 Jun 2011, 02:43 PM
Hi Joel,

Yes indeed there seems to be a problem with the RadDock control. We will do our best to fix it for the next release. For the time being my suggestion is to handle the DragEnd client-side event and set the RadDock's dockZone to null when the dock becomes floating. Here is a sample:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="RadScriptManager1" runat="server">
    </asp:ScriptManager>
    <script type="text/javascript">
        function OnClientDragEnd(dock, args)
        {
            if (dock.get_dockZoneID() == "")
                dock.set_dockZone(null);
        }
    </script>
    <div>
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
            <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="300px" Width="700px"
                FitDocks="false" Orientation="Horizontal">
                <telerik:RadDock ID="RadDock1" runat="server" Title="RadDock-Title" Width="300px"
                    Height="300px">
                    <ContentTemplate>
                        Dock's Content
                    </ContentTemplate>
                </telerik:RadDock>
                <telerik:RadDock ID="RadDock2" runat="server" Title="RadDock-Title" Width="300px"
                    Height="300px" Resizable="true" OnClientDragEnd="OnClientDragEnd">
                    <ContentTemplate>
                        Dock's Content
                    </ContentTemplate>
                </telerik:RadDock>
            </telerik:RadDockZone>
        </telerik:RadDockLayout>
    </div>
    </form>
</body>
</html>

Greetings,
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.

0
Joel
Top achievements
Rank 1
answered on 13 Jun 2011, 04:56 PM
That's what I was looking for. Thanks.
Tags
Dock
Asked by
Joel
Top achievements
Rank 1
Answers by
Pero
Telerik team
Joel
Top achievements
Rank 1
Share this question
or