AddNewRecordText - ToolTip: HTML Encoded

7 posts, 1 answers
  1. Christian
    Christian avatar
    11 posts
    Member since:
    Apr 2015

    Posted 10 Mar Link to this post

    If I add a value of "äöü&" to the AddNewRecordText of the CommandItemSettings for example, the button text appears correctly but the tooltip is displayed wrong. It shows "äöü&". It doesn't help when I put the already encoded text into the AddNewRecordText.

    Referring to this topic it seems to be an old problem:
    http://www.telerik.com/forums/addnewrecordtext---ampersand-problem

    I'm using the latest Telerik release (2016.1.225.45).

  2. Eyup
    Admin
    Eyup avatar
    3012 posts

    Posted 11 Mar Link to this post

    Hello Christian,

    I've created a sample RadGrid web site to demonstrate that the text is displayed as expected. Please run the attached web site sample and verify the result.

    Regards,
    Eyup
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Christian
    Christian avatar
    11 posts
    Member since:
    Apr 2015

    Posted 11 Mar in reply to Eyup Link to this post

    Thanks, I checked your code but I still get the encoded letters. But it's not the tooltip on the button which I mentioned in my post. This tooltop is fine, in my Project as well. It's the tooltip of the displayed text on the right side of the button which is wrong I recognized now.

    Please the the screenshot attached to this post.
  5. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1798 posts

    Posted 16 Mar Link to this post

    Hi Christian,

    I have tested the sample page that Eyup have attached and it displays the tooltip correctly in all browsers on my side (attached is a screenshot from the test). Can you please confirm that you have tested the attached page on your end?

    Looking forward to your reply.


    Regards,
    Konstantin Dikov
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  6. Christian
    Christian avatar
    11 posts
    Member since:
    Apr 2015

    Posted 31 Mar in reply to Konstantin Dikov Link to this post

    Hi Konstantin,

    sorry for the late answer. I just tested the page that Eyup have attached again with the same result. The tooltip of the text is encoded.

    Here is the result taken from the browser (see the "title" attribute of the "a"-tag). I testet it with IE 11 and Chrome 49.0.2623.110 m. Both the same.

    Telerik.Web.UI.dll version 2016.1.255.45

    <td align="left">
       <input name="RadGrid1$ctl00$ctl02$ctl00$AddNewRecordButton" title="äöü&" class="rgAdd" id="RadGrid1_ctl00_ctl02_ctl00_AddNewRecordButton" type="submit" value=" ">
       <a title="&#228;&#246;&#252;&amp;" id="RadGrid1_ctl00_ctl02_ctl00_InitInsertButton" href="javascript:__doPostBack('RadGrid1$ctl00$ctl02$ctl00$InitInsertButton','')">äöü&</a>
    </td>

  7. Answer
    Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1798 posts

    Posted 31 Mar Link to this post

    Hello Christian,

    I have once again tested the scenario, but this time with Classic render mode and I was able to replicate the issue. However, I have to say that this is something that could not be changed in the classic rendering, so I would suggest the following solutions:
    • Set the RenderMode of the RadGrid to "Lightweight";
    • Place RadToolTipManager on your page:
    <telerik:RadToolTipManager runat="server" AutoTooltipify="true"></telerik:RadToolTipManager>

    As a workaround with the classic rendering you could find the element and manually decode the title.


    Best Regards,
    Konstantin Dikov
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  8. Christian
    Christian avatar
    11 posts
    Member since:
    Apr 2015

    Posted 04 Apr Link to this post

    That's right! The choosen RenderMode is making the difference! So I have to see what I will do. Maybe I try to switch the whole Project to RenderMode="LightWeight" but than it's a bit more work to do. We'll see...

    Thanks for your effort, Konstantin!

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