Auto-height for textbox?

9 posts, 1 answers
  1. xws-mika
    xws-mika avatar
    18 posts
    Member since:
    Nov 2007

    Posted 10 Sep 2008 Link to this post

    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?

  2. Plamen Peshev
    Admin
    Plamen Peshev avatar
    886 posts

    Posted 10 Sep 2008 Link to this post

    Hello xws-mika,


    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. xws-mika
    xws-mika avatar
    18 posts
    Member since:
    Nov 2007

    Posted 10 Sep 2008 Link to this post

    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...

  5. Answer
    Plamen Peshev
    Admin
    Plamen Peshev avatar
    886 posts

    Posted 11 Sep 2008 Link to this post

    Hello xws-mika,


    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.
  6. Grendizer
    Grendizer avatar
    51 posts
    Member since:
    Sep 2008

    Posted 21 Oct 2008 Link to this post

    Hello Plamen,

    Is there any news concerning this feature ?!

    Thanks in advance for your answer.
  7. Plamen Peshev
    Admin
    Plamen Peshev avatar
    886 posts

    Posted 24 Oct 2008 Link to this post

    Hello Grendizer,


    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.
  8. Grendizer
    Grendizer avatar
    51 posts
    Member since:
    Sep 2008

    Posted 24 Oct 2008 Link to this post

    Thanks for your answer.
  9. Vamshi
    Vamshi avatar
    17 posts
    Member since:
    Jul 2010

    Posted 18 Nov 2014 Link to this post

    Hi,

    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!
  10. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 21 Nov 2014 Link to this post

    Hi,

    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.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017