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

RadTextBox Width not respected if Label is set

7 Answers 353 Views
Input
This is a migrated thread and some comments may be shown as answers.
Holly Blankenship
Top achievements
Rank 1
Holly Blankenship asked on 24 Jun 2008, 08:08 PM
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>

7 Answers, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 25 Jun 2008, 05:33 AM
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
0
Gordon Doherty
Top achievements
Rank 1
answered on 12 Mar 2010, 02:27 PM
Hi,

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

Thanks
0
Dimo
Telerik team
answered on 12 Mar 2010, 02:52 PM
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.
0
Gordon Doherty
Top achievements
Rank 1
answered on 12 Mar 2010, 03:13 PM
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
0
Dimo
Telerik team
answered on 12 Mar 2010, 03:53 PM
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.
0
Harry Kable
Top achievements
Rank 1
answered on 13 Mar 2010, 06:23 AM
Hi Dimo
This problem still exists with the RadComboBox even in Q1 2010.
I would be grateful if it could be fixed urgently.
0
Dimo
Telerik team
answered on 15 Mar 2010, 10:50 AM
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.
Tags
Input
Asked by
Holly Blankenship
Top achievements
Rank 1
Answers by
Pavel
Telerik team
Gordon Doherty
Top achievements
Rank 1
Dimo
Telerik team
Harry Kable
Top achievements
Rank 1
Share this question
or