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

Resize Dock whilst Docked....

2 Answers 56 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 10 Sep 2009, 04:01 AM
Hi,

Has anyone got a solution for resizing a dock, whilst it is docked?  I am thinking of creating a custom command to open a dialog / slider to allow for the resize....  But, I was wondering if anyone had worked out a nicer method for doing this?


Thanks,

Richard

2 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 14 Sep 2009, 02:11 PM
Hello Richard,

This functionality is not supported by the RadDock control and it is so by design. However, for your convenience we have created a workaround that overrides the built-in behavior and makes the dock resizable when docked to a zone. Here is the source code of a project that implements this workaround:

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head id="Head1" runat="server"
    <title></title
</head> 
<body> 
    <form id="form1" runat="server"
    <asp:ScriptManager ID="ScriptManager1" runat="server"
    </asp:ScriptManager> 
    <div> 
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server"
            <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="500px" 
                FitDocks="false"
                <telerik:RadDock ID="RadDock1" runat="server" Width="300px" Title="RadDock-Title" 
                    OnClientResizeEnd="ResizeEnd" OnClientInitialize="DockInit" OnClientDockPositionChanged="DockPositionChanged" 
                    Resizable="true"
                    <ContentTemplate> 
                        <br /> 
                        <br /> 
                        <br /> 
                        <br /> 
                        <br /> 
                        CONTENT 
                        <br /> 
                        <br /> 
                        <br /> 
                        <br /> 
                        <br /> 
                    </ContentTemplate> 
                </telerik:RadDock> 
            </telerik:RadDockZone> 
        </telerik:RadDockLayout> 
    </div> 
    </form> 
 
    <script type="text/javascript"
        //Workaround to make dock resizable whilst docked 
        var curZone; 
        Telerik.Web.UI.RadDock.prototype.oldResizeStart = Telerik.Web.UI.RadDock.prototype.onResizeStart; 
        Telerik.Web.UI.RadDock.prototype.onResizeStart = function() 
        { 
            curZone = this._dockZoneID; 
            this._dockZoneID = null
 
            this.oldResizeStart(); 
        } 
        function ResizeEnd(dock, args) 
        { 
            this._dockZoneID = curZone
            curZone = null
        } 
        function DockInit(dock, args) 
        { 
            dock._configureHandles(true); 
        } 
        function DockPositionChanged(dock, args) 
        { 
            dock._configureHandles(true); 
        } 
        //Workaround to make dock resizable whilst docked 
         
    </script> 
 
</body> 
</html> 
 
     
I hope this will help you implement your scenario.

All the best,
Pero
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Richard
Top achievements
Rank 1
answered on 14 Sep 2009, 02:54 PM
thanks for the help.  Really appreciated.


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