Auto-sizing controls/content in a RadDock

7 posts, 0 answers
  1. Steve
    Steve avatar
    24 posts
    Member since:
    Mar 2012

    Posted 14 Nov 2012 Link to this post

    Hello,

    I have dynamically generated RadDocks that are loading user controls (ascx).  Inside one Dock is a user control with a RadScheduler and in another Dock is a user control with a RadGrid.  I am unable to get the Scheduler or the Grid to expand to fit 100% in height and Width within the Dock when the page first renders.  If I make some sort of request in the control (such as changing the view in the Scheduler) or if I "Restore" the Browser itself, however; it automatically adjusts correctly.  I have tried setting the Scheduler and the Grid's Height and Width properties to 100%, as well as wrapping them in a DIV with the same properties set, yet they do not adjust on their own without intervention.

    Here is an image of the initial behavior I am experiencing:


    Thanks for the help.

    Steve
  2. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 19 Nov 2012 Link to this post

    Hello Steve,

    I tried to reproduce the described behavior, but to no avail. Please check the attached sample and let me know what should be changed so that I can inspect your scenario locally and suggest a solution.

    Kind regards,
    Slav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Steve
    Steve avatar
    24 posts
    Member since:
    Mar 2012

    Posted 19 Nov 2012 Link to this post

    Slav,

    Thank you for your reply.  My project is much more complex than your example, however; I do notice that you are setting the Dock Width explicitly to 600 pixels, whereas we are setting this to a percentage.  Could this be where the issue resides?

    Thanks,

    Steve
  5. Madhav Joshi
    Madhav Joshi avatar
    19 posts
    Member since:
    Oct 2012

    Posted 21 Nov 2012 Link to this post

    Hi Slav,
    I have been Facing Issues too when i set Docks width in percentage and even set resize= false property, but on Double Click of docks it goes on resizing.Please help me on this asap.

    Thanks,
    Madhav
  6. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 22 Nov 2012 Link to this post

    Hello guys,

    After setting the width of the RadDocks in my sample with values in percentage their content keeps resizing accordingly.  It is possible that the grid cannot calculate its size, if the size of any of its parent elements is not specified. You can try finding such elements and setting their width either with fixed values or in percentage. If the problem persists I will need a simple, runnable page that isolates the problem in order to help you accordingly.

    Note that setting the Resizable property to true allows you to resize the docks by dragging their edges. This is not related to the docks being resized with the browser when their size is set in percentage. You should use fixed width and height if you want to keep the size of the docks.

    Kind regards,
    Slav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  7. Madhav Joshi
    Madhav Joshi avatar
    19 posts
    Member since:
    Oct 2012

    Posted 25 Nov 2012 Link to this post

    Hey Slav,

    I Could Resolve the Problem By Setting EnableAnimation ="False" (Which was true in my case ).
    ,I was stuck with this Weird Behaviour of RadDock Shrinking in size on double click of Title bar and Widths of Raddocks in Percentage.

    Please try reproducing and Report Bug as i am not allowed to do so .

    Thanks,
    Madhav Joshi
  8. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 28 Nov 2012 Link to this post

    Hi Madhav,

    I tried to reproduce your problem with the sample page, shown below, but to no avail. Please examine it and let me know what needs to be modified in order to replicate the issue. Also, specify which version of RadControls is used on your end.

    <!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="Scriptmanager1" runat="server" />
        <telerik:RadDockLayout runat="server" ID="RadDockLayout1">
            <telerik:RadDockZone runat="server" ID="RadDockZone1" Width="300px" Height="300px">
                <telerik:RadDock runat="server" ID="RadDock1" Width="100%" Height="200px" EnableAnimation="false">
                </telerik:RadDock>
            </telerik:RadDockZone>
        </telerik:RadDockLayout>
        </form>
    </body>
    </html>


    Greetings,
    Slav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017