Resizing a floating dock.

3 posts, 0 answers
  1. Joel
    Joel avatar
    2 posts
    Member since:
    Jun 2011

    Posted 11 Jun 2011 Link to this post

    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. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 13 Jun 2011 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Joel
    Joel avatar
    2 posts
    Member since:
    Jun 2011

    Posted 13 Jun 2011 Link to this post

    That's what I was looking for. Thanks.
Back to Top