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

Resizing dynamically created docks

6 Answers 95 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Kyle
Top achievements
Rank 1
Kyle asked on 16 May 2008, 07:47 PM
I'm running into an issue related to resizing dynamically created docks. I'm adding docks in a similar way to the My Portal example provided here http://www.telerik.com/DEMOS/ASPNET/Prometheus/Dock/Examples/MyPortal/DefaultCS.aspx. However I haven't been able to make my docks resizable. I tried adding  "dock.Resizable = true;" to both the CreateRadDock() and CreateRadDockFromState() functions but that didn't work. I know with normal docks you have to set the behavior but I haven't been able to figure out how to do it dynamically. Any help would be appreciated. Thanks.

Kyle

6 Answers, 1 is accepted

Sort by
0
Sophy
Telerik team
answered on 17 May 2008, 06:54 AM
Hi Kyle,

To make the RadDocks in the My Portal demo resizable you need to simply set dock.Resizable = true; in the CreateRadDock method. Make sure that the dll you use is at least from Q1 2008 when the resize functionality was introduced in RadDock for ASP.NET AJAX. Please, also note that currently the RadDocks cannot be resized when they are collapsed or docked in a zone. You will need to move them outside their parent zone in order to resize them.
For your convenience I have attached the My Portal example with resizable docks.
Let us know in case you need further assistance.

Greetings,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Philippe
Top achievements
Rank 1
answered on 26 May 2008, 08:38 PM
Dear Sophy,

Is there any plans to allow dock resizing when the docks are in docked state soon?

Thanks.
0
Sophy
Telerik team
answered on 27 May 2008, 06:36 AM
Hi Philippe,

Our plans are to allow docks being resizable when docked in a zone and currently we are considering what is the most proper resize behavior of the docked RadDocks.
In RadDock for ASP.NET the RadDockingZones are rendered as table html elements while in RadDock for ASP.NET AJAX the RadDockZones are rendered as div html elements. This has serious implications on  the dock's resize functionality when docked in a zone. That i why, we need to make a research and choose the best way to implement dock's resizing when docked in a zone.

All the best,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Accepted
Philippe
Top achievements
Rank 1
answered on 27 May 2008, 02:05 PM
All right, I'm glad to hear you are considering to implement this feature... Thanks
0
Chris Trina
Top achievements
Rank 1
answered on 18 Feb 2010, 05:50 PM
Was this feature ever implemented?  It does not appear to be. 
0
Pero
Telerik team
answered on 23 Feb 2010, 01:28 PM
Hello Chris,

This feature was never implemented since there is an "easy" workaround that will make the dock resizable while docked into a zone. Here is the source code:

.aspx
<%@ 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">
<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 currentZone;
        Telerik.Web.UI.RadDock.prototype.oldResizeStart = Telerik.Web.UI.RadDock.prototype.onResizeStart;
        Telerik.Web.UI.RadDock.prototype.onResizeStart = function()
        {
            currentZone = this._dockZoneID;
            this._dockZoneID = null;
 
            this.oldResizeStart();
        }
        function ResizeEnd(dock, args)
        {
            dock._dockZoneID = currentZone;
            currentZone = 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>



All the best,
Pero
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Dock
Asked by
Kyle
Top achievements
Rank 1
Answers by
Sophy
Telerik team
Philippe
Top achievements
Rank 1
Chris Trina
Top achievements
Rank 1
Pero
Telerik team
Share this question
or