Treeview Enable/Disable HTML encoding at node level

3 posts, 1 answers
  1. Charles
    Charles avatar
    9 posts
    Member since:
    Aug 2015

    Posted 09 Feb Link to this post

    In general, I want a treeview I have to disable html encoding (enablenodetexthtmlencoding="false"). It looks great and lets me style the nodes accordingly. In some circumstances, I want to allow nodes to have < in their names, which causes issues with the encoding:

    Examples:

    CIR<CLE turns into CIR<cle< span=""/>

    CIRCLE<E> turns into CIR <e/>

    both of which display as HTML.

    Is there any property or method to get these names to display, as needed, at the node level which will override the property set at the radtreeview?

  2. Answer
    Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 12 Feb Link to this post

    Hello Charles,

    For such scenarios where you need to have certain html embedded in the nodes declaration, we suggest the usage of Templates. Please refer to the following documentation, providing delated informatino on the Server and Client templates available with the RadTreeView:

    http://docs.telerik.com/devtools/aspnet-ajax/controls/treeview/templates/overview

    Hope this would help.

    Regards,
    Nencho
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Charles
    Charles avatar
    9 posts
    Member since:
    Aug 2015

    Posted 12 Feb in reply to Nencho Link to this post

    Thanks Nencho. I tried out the client templates (http://docs.telerik.com/devtools/aspnet-ajax/controls/treeview/templates/client-templates) and they worked perfectly.
Back to Top