RadTextBox Width not respected if Label is set

8 posts, 0 answers
  1. Holly Blankenship
    Holly Blankenship avatar
    2 posts
    Member since:
    Oct 2007

    Posted 24 Jun 2008 Link to this post

    I'm currently using version 2008.1.515.20

    I'm finding that when I don't set the Label on a RadTextBox it is drawn at the width I set.  If I do set the Label, then the control is drawn as width=100%.

    This is the code that produces the correct width
    <telerik:RadTextBox ID="RadTextBox1" runat="server" InvalidStyleDuration="100" Skin="Office2007" Text='<%# Bind("EstimateTitle") %>' Width="100px" Wrap="False"></telerik:RadTextBox>


    This is the code that produces the 100% width.
    <telerik:RadTextBox ID="RadTextBox1" runat="server" InvalidStyleDuration="100" Label="Title" Skin="Office2007" Text='<%# Bind("EstimateTitle") %>' Width="100px" Wrap="False"></telerik:RadTextBox>
  2. Pavel
    Admin
    Pavel avatar
    904 posts

    Posted 25 Jun 2008 Link to this post

    Hi Holly,

    This is a known problem with the latest version of the RadTextBox control. It is already logged in our bug-tracking system. Hopefully our developers will address the issue soon.

    Kind regards,
    Pavel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Gordon Doherty
    Gordon Doherty avatar
    6 posts
    Member since:
    Jan 2010

    Posted 12 Mar 2010 Link to this post

    Hi,

    Has this issue been resolved? It is currently a breaker for us as to whether we buy Telerik or not?

    Thanks
  5. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 12 Mar 2010 Link to this post

    Hi Gordon,

    I am glad to inform you that the problem has been resolved a long time ago.

    Greetings,
    Dimo
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Gordon Doherty
    Gordon Doherty avatar
    6 posts
    Member since:
    Jan 2010

    Posted 12 Mar 2010 Link to this post

    Hi Dimo,

    Great Stuff!

    One other thing: has the issue been resolved regarding the 'shared' width of a RadTextBox with a label text. e.g. you set TextBox.Label = "someVeryLongTextIndeed", and this causes your textbox to be squashed in at the end of that text.

    We'd really need to be able to control the textbox and label width. Or if we could push the textbox onto the line after the label that would suffice too.

    Look forward to your reply.

    Thanks Again
  7. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 12 Mar 2010 Link to this post

    Hi Gordon,

    When using a label, the width is shared by design. I am afraid there is no way to have the native label and the textbox on separate lines. You can use a separate <label> element to achieve that:

    http://www.telerik.com/support/kb/aspnet-ajax/input/standard-compliant-radinput-and-raddatetimepicker-with-no-tables.aspx

    You can control the label width like this:

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     
    <head runat="server">
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <title>RadControls</title>
    <style type="text/css">
     
    .Label140
    {
        display:block;
        width:140px;
    }
     
    </style>
    </head>
    <body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
     
    <telerik:RadTextBox ID="RadTextBox2" runat="server" Label="Label 140px" LabelCssClass="Label140" Width="300px" />
    <br /><br />
    <telerik:RadTextBox ID="RadTextBox1" runat="server" Label="Longer Label 140px" LabelCssClass="Label140" Width="300px" />
     
    </form>
    </body>
    </html>


    Greetings,
    Dimo
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  8. Harry Kable
    Harry Kable avatar
    19 posts
    Member since:
    Jan 2010

    Posted 13 Mar 2010 Link to this post

    Hi Dimo
    This problem still exists with the RadComboBox even in Q1 2010.
    I would be grateful if it could be fixed urgently.
  9. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 15 Mar 2010 Link to this post

    Hello Harry,

    You mean that the RadComboBox is always 100% wide, no matter what width you set? Can you provide a demo, which reproduces that?

    All the best,
    Dimo
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017