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

Auto-sizing controls/content in a RadDock

6 Answers 228 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 14 Nov 2012, 07:07 PM
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

6 Answers, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 19 Nov 2012, 02:33 PM
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.
0
Steve
Top achievements
Rank 1
answered on 19 Nov 2012, 05:29 PM
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
0
Madhav Joshi
Top achievements
Rank 2
answered on 21 Nov 2012, 08:26 AM
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
0
Slav
Telerik team
answered on 22 Nov 2012, 02:00 PM
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.
0
Madhav Joshi
Top achievements
Rank 2
answered on 25 Nov 2012, 10:34 AM
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
0
Slav
Telerik team
answered on 28 Nov 2012, 04:58 PM
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.
Tags
Dock
Asked by
Steve
Top achievements
Rank 1
Answers by
Slav
Telerik team
Steve
Top achievements
Rank 1
Madhav Joshi
Top achievements
Rank 2
Share this question
or