More in this section
Forums / Designing & Styling / RadTreeView: Add class to node containter

RadTreeView: Add class to node containter

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. Craig
    Craig avatar
    9 posts
    22 Feb 2011
    04 Jun 2011
    Link to this post
    I need to add a class to a node's container - the <li> tag that contains the node content.  I see that I can add classes with the following properties:
    - CssClass
    - ContentCssClass
    - SelectedCssClass

    But I can't find any way to add a class to the <li> tag that contains the node.  I want it to look like this:

    <li class="rtLI first MY-CSS-CLASS-GOES-HERE">
      <div class="rtTop rtSelected">
        <span class="rtSp"></span><a class="rtIn" href="campaign">Campaign</a>
      <ul class="rtUL"></ul>
  2. Jordan
    Jordan avatar
    172 posts
    20 Oct 2015
    09 Jun 2011
    Link to this post
    Hello Craig,

    If you want to appy styles to all of the li items you can just use the following selector:

    .RadTreeView .rtUL .rtLI {

    If you need this selector for different purposes than styling you can apply it with jQuery
    $(document).ready(function() {
            $(".RadTreeView .rtUL .rtLI").addClass("YourClassName");

    If you want to apply a class to specific item you can also do it on document.ready:

    $(document).ready(function() {
            $(".RadTreeView .rtUL .rtLI").eq(3).addClass("YourClassName");

    All the best,
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered