dynamic dock's width causing problem.

2 posts, 0 answers
  1. Ajish Rehuman
    Ajish Rehuman avatar
    2 posts
    Member since:
    Jul 2009

    Posted 24 Sep 2009 Link to this post


    I am developing a web portal with a fixed number of widgets and templates. here docks are used as templates, with the option to drag and drop it from one zone to another. in this all the raddock controls except the RaddockLayout is created dynamically.

    there is an option to create tabcontols dynamically. on creating a tabpage, a new Radpageview is also creaed and is associated with the new tab. After creating a tab and pageview, a Usercontol which contains a Predefined layout of RaddoxkZones is selected and is added dynamically to this pageview. Now, each tab contains a pageview,  which in turn contains a user control control whic is filled with 2-4 raddockZones.

    The real issue starts here....

    When I add a dock to this layout (dockzones contained within the user control), i want the docks to fill the entire area of the zone. For that I am setting the with of the raddock to "100%" . this works fine.. if I move to another tab page and do the same thing and come back to the previous page, the width of the dock is same as the width of the page. I havent given any width for the Raddockzones, as I am using a splitter control, so that if I collapse the splitter, the dockzones should keep expanding. Fitdocks property of the docks are set to true.

    What i understand from this issue is that, if I perform any action which causes a postback, the entire docks in the tab page except in the one which is selected is not created properly crearted from its states, which is stored in session/database.

    once again, all the docks in this page id created dynamically.

    Can anyone help me with this issue.. looking forward for a solution at the earliest..


  2. Pero
    Pero avatar
    1156 posts

    Posted 29 Sep 2009 Link to this post

    Hello Ajish,

    Please note that, the Width (and the Height) property of the RadDock control is designed to accept values specified only in pixels. If you use percent values the control may not behave as expected, that is why pixels should be used.

    The scenario you are trying to implement is the dock's default behavior. If you place a dock in a zone it will expand its width to fill up the area of the zone, no matter the Width set to the dock itself. Test the following code and you will see that even the dock has Width=200px it will expand to the Width (which is 300px) of the RadDockZone.
    <%@ 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"
        <form id="form1" runat="server"
        <asp:ScriptManager ID="ScriptManager1" runat="server"
            <telerik:RadDockLayout ID="RadDockLayout1" runat="server"
                <telerik:RadDockZone ID="RadDockZone1" runat="server" Height="300px" Width="300px"
                    <telerik:RadDock ID="RadDock1" runat="server" Width="200px" Title="RadDock-Title"
                            <br /> 
                            <br /> 
                            <br /> 
                            <br /> 
                            <br /> 
                            <br /> 
                            <br /> 
                            <br /> 
                            <br /> 
                            <br /> 

    If you still cannot resolve the problem, please open a support ticket and send us a sample running project where the issue can be observed. Also provide a detailed steps to reproduce the problem.

    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.
Back to Top