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

set dock height & width in percentage

3 Answers 115 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Golu
Top achievements
Rank 1
Golu asked on 14 May 2009, 06:54 AM

Dear sir,
how can we set dock heigth &  width in percentage which is created dynamically

thanks with regards

3 Answers, 1 is accepted

Sort by
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 14 May 2009, 11:30 AM
Here is the code:

 

RadDock dock = new RadDock();

 

dock.Width =

Unit.Percentage(50);

 

dock.Height =

Unit.Percentage(50);

 

0
Golu
Top achievements
Rank 1
answered on 15 May 2009, 04:20 AM
Dear sir,
thank you
but its not working , its not take 50% of the page, if I give unit.percentange(50) of the dock its show me a small size box.

0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 15 May 2009, 11:26 AM
The RadDock is rendered as a Div on the client, so you could change RAdDock with a Div(width=50% and height=50%) and see the result - the div should be small too.
I tested the following code(IE8 and FF3) and RadDock seems to be exactly 50%
ASPX:
<%@ register tagprefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" %> 
<!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 runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager> 
    <div> 
            <telerik:RadDock ID="RadDock1" runat="server"></telerik:RadDock> 
    </div> 
    </form> 
</body> 
</html> 
Codebehind:
 protected void Page_Load(object sender, EventArgs e)  
    {  
        RadDock1.Width = Unit.Percentage(50);  
        RadDock1.Height = Unit.Percentage(50);  
    } 

Tags
Dock
Asked by
Golu
Top achievements
Rank 1
Answers by
Obi-Wan Kenobi
Top achievements
Rank 1
Golu
Top achievements
Rank 1
Share this question
or