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

TextBox Width inside RadDock

1 Answer 101 Views
Dock
This is a migrated thread and some comments may be shown as answers.
ahmad
Top achievements
Rank 1
ahmad asked on 08 Sep 2009, 06:53 AM
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. 

Regards,
Ahmad

1 Answer, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 10 Sep 2009, 02:51 PM
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:

<head> 
    <style type="text/css"
        .rdContent 
        { 
            padding: 0 4px 0 2px
        } 
    </style> 
</head> 


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"
    <title></title
    <style type="text/css"
        .rdContent 
        { 
            padding: 0 4px 0 2px; 
        } 
    </style> 
</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="300px" Title="RadDock-Title"
                    <ContentTemplate> 
                        <br /> 
                        <br /> 
                        <br /> 
                        <table> 
                            <tr> 
                                <td style="width: 50%"
                                    <asp:Label ID="Label2" runat="server" Text="[Label Text]" Width="100%"></asp:Label> 
                                </td> 
                                <td style="width: 50%"
                                    <asp:TextBox ID="TextBox2" runat="server" Text="[TextBox Text]" Width="100%"></asp:TextBox> 
                                </td> 
                            </tr> 
                        </table> 
                        <br /> 
                        <br /> 
                        <br /> 
                    </ContentTemplate> 
                </telerik:RadDock> 
            </telerik:RadDockZone> 
        </telerik:RadDockLayout> 
    </div> 
    </form> 
</body> 
</html> 
 



Greetings,
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
ahmad
Top achievements
Rank 1
Answers by
Pero
Telerik team
Share this question
or