Highlight the full row of a node

4 posts, 0 answers
  1. Eugen
    Eugen avatar
    5 posts
    Member since:
    Aug 2010

    Posted 13 Sep 2010 Link to this post

    Hi everyone,

    Is there a way to highlight the "full row" of a node? I mean the highlighted node background to fit the entire control width.

    The default mode is note text length dependent.

    Thanks!

  2. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 14 Sep 2010 Link to this post

    Hello Eugen,

    Yes, there is!
    Here is how you can do that:
    // highlight the first node in the rootNodesCollection
    var $ = $telerik.$;
    var tree = $find("RadTreeView1");
    var nodeElement = tree.get_nodes().getNode(0).get_element();
    var nodeRow = $('> div', nodeElement);
    $(nodeRow).css("background-color", "yellow");

    Hope this is helpful for you!


    Regards,
    Nikolay Tsenkov
    the Telerik team
    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 Public Issue Tracking system and vote to affect the priority of the items
  3. Eugen
    Eugen avatar
    5 posts
    Member since:
    Aug 2010

    Posted 01 Dec 2010 Link to this post

    Thank you Nikolay for your replay but unfortunately this is not what I want. I want to set the background (image/color) for any child node to spread on the entire tree width. Your JS approach only spread the background element over the "bullet" zone (additional to text zone) of the node (<LI> element)
  4. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 03 Dec 2010 Link to this post

    Hi Eugen,

    Well, this is not so trivial to be achieved. My suggestion is to use the RadTreeList that we have recently introduced. There all the elements are having the same width and at the same time you still get the treeView's hierarchical capabilities.


    Regards,
    Nikolay Tsenkov
    the Telerik team
    Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top