Resizing dynamically created docks

7 posts, 1 answers
  1. Kyle
    Kyle avatar
    1 posts
    Member since:
    May 2008

    Posted 16 May 2008 Link to this post

    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
  2. Sophy
    Admin
    Sophy avatar
    636 posts

    Posted 17 May 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Philippe
    Philippe avatar
    22 posts
    Member since:
    Sep 2007

    Posted 26 May 2008 Link to this post

    Dear Sophy,

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

    Thanks.
  5. Sophy
    Admin
    Sophy avatar
    636 posts

    Posted 27 May 2008 Link to this post

    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
  6. Answer
    Philippe
    Philippe avatar
    22 posts
    Member since:
    Sep 2007

    Posted 27 May 2008 Link to this post

    All right, I'm glad to hear you are considering to implement this feature... Thanks
  7. Chris Trina
    Chris Trina avatar
    86 posts
    Member since:
    Mar 2006

    Posted 18 Feb 2010 Link to this post

    Was this feature ever implemented?  It does not appear to be. 
  8. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 23 Feb 2010 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017