MultiLine Radtextbox inside radgrid with edit mode does not allow carriage return

2 posts, 0 answers
  1. Benjamin
    Benjamin avatar
    7 posts
    Member since:
    Feb 2016

    Posted 31 Mar Link to this post

    Hello everyone,

    I've been facing issues with RadTextBox for ASP in MultiLine mode when pressing the enter key. Actually no new line is displayed. When I set the text from codebehind or using binding the text is correctly displayed on multiple lines. This is illustrated in the radtextbox.png file attached.

    Below is my code for the RadTextBox element :

    <telerik:RadTextBox ID="RadTextBox1"
        Text='<%# DataBinder.Eval(Container, "DataItem.MyField") %>'
        runat="server" TextMode="MultiLine" Rows="8" Columns="40"

    In the struct.png file attached you'll find the structure of my web page.

    By googling around and visiting many forum threads (including of course telerik) I found many potentials sources and fixes for the issue :

    • DefaultButton : tried with and without but no luck
    • white-space ccs attribute : the pre-wrap is what I need and what is set by default. I also tried normal and pre but still no luck
    • onkeypress event : captured the enter key event but did not work out in the end
    • AcceptsReturn : supposed to be for WinForms but at least I tried

    I am using .Net Framework 4.0 and UI for ASP.NET AJAX v.2016.1.225.40.

    Does anyone have a clue about this ?


  2. Benjamin
    Benjamin avatar
    7 posts
    Member since:
    Feb 2016

    Posted 04 Apr in reply to Benjamin Link to this post

    Well, acutally I hadthe Enter key press event captured in my master page.
    Now that I have disabled it everything is working fine.
  3. DevCraft R3 2016 release webinar banner
Back to Top