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

CrLf in EmptyMessage + Tooltip

1 Answer 90 Views
Input
This is a migrated thread and some comments may be shown as answers.
Stein
Top achievements
Rank 1
Stein asked on 17 Jul 2014, 09:49 PM
Seems like if you have a multiline radtextbox with a multilined emptymessage (containing CrLf's) AND a tooltip, the emptymessage is set as the value of the textbox.

If only using Lf's to seperate the lines it is working as expected


generated html that is working (without Cr's):
<input ...... value="{"enabled":true,"emptyMessage":"EmptyMsg1\nEmptyMsg2","validationText":"","valueAsString":"","lastSetTextBoxValue":"EmptyMsg1\nEmptyMsg2"}">

generated html that is working (with CrLf's):
<input value="{"enabled":true,"emptyMessage":"EmptyMsg1\r\nEmptyMsg2","validationText":"EmptyMsg1\nEmptyMsg2","valueAsString":"EmptyMsg1\nEmptyMsg2","lastSetTextBoxValue":"EmptyMsg1\nEmptyMsg2"}">

I've manually fixed this by removing any Cr's from the EmptyMessage, but seems like a strange bug as it is only a problem when a text for .Tooltip is used.

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 22 Jul 2014, 12:56 PM
Hi Stein,

The described behavior is observed because of the way the RadTextBox control works internally. If you would like to have the EmptyMessage displayed on more than one line you should replace the "\r\n" string with "\n". This way the EmptyMessage text will be displayed only when the input is blurred and has no value.


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.

 
Tags
Input
Asked by
Stein
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or