CrLf in EmptyMessage + Tooltip

2 posts, 0 answers
  1. Stein
    Stein avatar
    25 posts
    Member since:
    Apr 2008

    Posted 17 Jul 2014 Link to this post

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

    Posted 22 Jul 2014 Link to this post

    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.

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