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

dynamic dock's width causing problem.

1 Answer 70 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Ajish Rehuman
Top achievements
Rank 1
Ajish Rehuman asked on 24 Sep 2009, 08:51 PM
Hi,

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..

Thanks,

Ajish.

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 29 Sep 2009, 12:52 PM
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"
    <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="300px"
                <telerik:RadDock ID="RadDock1" runat="server" Width="200px" Title="RadDock-Title"
                    <ContentTemplate> 
                        <br /> 
                        <br /> 
                        <br /> 
                        <br /> 
                        <br /> 
                        CONTENT 
                        <br /> 
                        <br /> 
                        <br /> 
                        <br /> 
                        <br /> 
                    </ContentTemplate> 
                </telerik:RadDock> 
            </telerik:RadDockZone> 
        </telerik:RadDockLayout> 
    </div> 
    </form> 
</body> 
</html> 

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.

Regards,
Pero
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.
Tags
Dock
Asked by
Ajish Rehuman
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or