TextBox Width inside RadDock

2 posts, 0 answers
  1. ahmad
    ahmad avatar
    8 posts
    Member since:
    Mar 2009

    Posted 08 Sep 2009 Link to this post

    Hi All,

    Dynamically,I created RadDock and added an html table of 2 cells with 50% width for each.In the first cell i addel an asp.net label and asp.net textbox in the second one with100% width for each control.
    In the default masterpage of sharepoint,it works fine while in another masterpage(inside sharepoint like BlueBand.master or customized one) the textbox right border becomes outside the raddock.It seems that it adds the default padding and border-width to its width because if i remove the padding and put the border width 0px then i see that the textbox becomes in the RadDock Content.
    But I need the borders and the padding,also i can't put the textbox width 99% or 98%.

    Is this behavior of textbox inside the RadDock an normal behavior ?

    Any Help is really appreciated. 

  2. Pero
    Pero avatar
    1156 posts

    Posted 10 Sep 2009 Link to this post

    Hello Ahmad,

    This is not related to the RadDock control but a browser behavior. If you place the same <table> in a <div> element with fixed Width, the right border of the textbox will go outside the boundaries of the <div>.

    Try setting padding to the dock's content element using the following CSS:

        <style type="text/css"
                padding: 0 4px 0 2px

    Also here is the source code of the project that I tested:
    <%@ 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"
        <style type="text/css"
                padding: 0 4px 0 2px; 
        <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="300px" Title="RadDock-Title"
                            <br /> 
                            <br /> 
                            <br /> 
                                    <td style="width: 50%"
                                        <asp:Label ID="Label2" runat="server" Text="[Label Text]" Width="100%"></asp:Label> 
                                    <td style="width: 50%"
                                        <asp:TextBox ID="TextBox2" runat="server" Text="[TextBox Text]" Width="100%"></asp:TextBox> 
                            <br /> 
                            <br /> 
                            <br /> 

    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