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

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

1 Answer 188 Views
Input
This is a migrated thread and some comments may be shown as answers.
Benjamin
Top achievements
Rank 1
Benjamin asked on 31 Mar 2016, 10:41 AM

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"
    RenderMode="Lightweight">
</telerik:RadTextBox>

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 ?

Regards,
Benjamin

1 Answer, 1 is accepted

Sort by
0
Benjamin
Top achievements
Rank 1
answered on 04 Apr 2016, 09:32 AM
Well, acutally I hadthe Enter key press event captured in my master page.
Now that I have disabled it everything is working fine.
Tags
Input
Asked by
Benjamin
Top achievements
Rank 1
Answers by
Benjamin
Top achievements
Rank 1
Share this question
or