Is there a way to set the height of a multi-row textbox so that it automatically shows it's complete content without scrollbars, but also without unnecessary white space at the bottom?
Reason: I have a page which can be in edit or in read-only mode. In read-only mode, I'd like for all input controls to show their complete content, regardless of the amount of text (e. g. for printing). Is this possible?
8 Answers, 1 is accepted
You can use the Rows property to specify the number of rows displayed in a multiline RadTextBox control -
review the following help article:
http://www.telerik.com/help/aspnet-ajax/telerik.web.ui-telerik.web.ui.radtextbox-rows.html
Best wishes,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Thanks for the quick response, Plamen! Well, I know the Rows property, but I don't know in advance how long the text in the textbox will be (depends on user entry), so I don't know in advance how many rows the textbox will need.
The point is that I want the textbox to be EXACTLY as high as required when the page is in read-only mode (in edit mode the height doen't matter). So it seems that I have to count the characters in the textbox and set the number of rows dynamically.
Disadvantage of this approach: the calculated number of rows can only be an estimation, especially because Internet Explorer breaks the line after a hyphen, but Firefox doesn't.
So I'm still hoping that the radTextbox has some kind of built-in feature for that purpose...
Currently, RadInput control does not support the requested functionality. Your request has been logged in our ToDo list for future consideration.
Kind regards,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Is there any news concerning this feature ?!
Thanks in advance for your answer.
Unfortunately, such feature will be very hard to be implemented and I doubt you will see it soon in the control. Anyway, your request has been logged in our ToDo list for future consideration. I will also appreciate if you provide links to online resources/other vendors which have this type of functionality included in their input controls. Thus we can research the matter in detail and eventually change our plans for future development.
All the best,
Plamen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I have a similar need now. Considering the last discussion on this was 6 years ago, I am hoping something is now available/possible for the textbox control. Is there?
Thanks!
Automatically changing the height of a RadTextBox control is not available out of the box. However, you could achieve this functionality with little JavaScript. Try using the approach suggested in this forum post.
Regards,
Viktor Tachev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.