set dock height & width in percentage

4 posts, 0 answers
  1. Golu
    Golu avatar
    41 posts
    Member since:
    Dec 2008

    Posted 14 May 2009 Link to this post

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

    thanks with regards

  2. Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 14 May 2009 Link to this post

    Here is the code:

     

    RadDock dock = new RadDock();

     

    dock.Width =

    Unit.Percentage(50);

     

    dock.Height =

    Unit.Percentage(50);

     

  3. Golu
    Golu avatar
    41 posts
    Member since:
    Dec 2008

    Posted 14 May 2009 Link to this post

    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.

  4. Obi-Wan Kenobi
    Obi-Wan Kenobi  avatar
    460 posts
    Member since:
    Aug 2007

    Posted 15 May 2009 Link to this post

    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);  
        } 

Back to Top