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

[Solved] RadTextBox Growing

4 Answers 194 Views
Input
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 2
David asked on 30 Apr 2008, 06:10 PM
Is there a way to set the width on a RadTextBox and not have it grow if the entered text is longer than that width?

I am using a RadTextBox in a RadGrid.  I have set the width to 200px for the textbox itself.  However, if the user enters a bood bit of text, the textbox will grow out to the right thus making the entire grid grow to the right - and off the edge of the screen.

Thanks,
David Martin

4 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 2
answered on 30 Apr 2008, 08:03 PM
After playing around with this I seem to have found that this growing behavior only exists if I have ShowButton == true.  Also, this is in SingleLine mode.

Any help with this would be greatly appreciated.  Otherwise I have to implement my own button there.  And while it's definitely doable, it's also one of the reasons we invest in 3rd party controls - the features that I don't have to write. :)

-David
0
Konstantin Petkov
Telerik team
answered on 01 May 2008, 10:20 AM
Hi David,

I've just tested that using the demo here:

http://www.telerik.com/demos/aspnet/prometheus/Input/Examples/Common/DataGrid/DefaultCS.aspx

The only change I made was to add ShowButton="true" for the text box. The input however does not change its width no matter the long text I type.

Can you please download the latest and actually the official version of RadControls for ASP.NET AJAX labeled 2008.1.415 and give it a try? Let us know this appear to be a problem, already addressed with the official version.

All the best,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
David
Top achievements
Rank 2
answered on 01 May 2008, 03:20 PM
Thanks for the quick response.  First, I was using the previous version.  I have since downloaded the lastest and greatest.  I upgraded my solution and the problem persisted.  So, I decided to work with the installed demos which you referenced.

Using the same demo as yourself, I too changed the ShowButton to true on the Name column.  And, like you pointed out, it "appears" to work.  However, if you move the Name column to the end and try it again you will see that the grid column resizes rather oddly.  I am linking a screen shot.

Again, the only thing I changed on the installed demo was to A) change the RadTextbox for the name column to have ShowButton = "true" and, B) moved the same name column to be the last column in the grid.

RadTextbox Screenshot

Thanks,
David
0
Sebastian
Telerik team
answered on 07 May 2008, 07:26 AM
Hello David,

Did you place the RadTextBox instance inside edit template of template grid column? Thus setting the width of the textbox should be sufficient to control its width dimension. You can test that in the project from this knowledge base article:

http://www.telerik.com/support/kb/article/b454K-eme-b454T-cbb-b454c-cbb.aspx

You may also check whether disabling the skin for the grid temporary makes a difference as some style setting applied through the skin may cause the unwanted rendering glitch.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Input
Asked by
David
Top achievements
Rank 2
Answers by
David
Top achievements
Rank 2
Konstantin Petkov
Telerik team
Sebastian
Telerik team
Share this question
or