Paiting multi-nodes with different color

2 posts, 1 answers
  1. Ben Turpin
    Ben Turpin avatar
    27 posts
    Member since:
    Jun 2008

    Posted 30 Sep 2008 Link to this post

    Hi!

    I want to create a client function that "paints" an array of nodes.
    It should look like a traditional selection but in a green color for example.
    Its not a selection really, I just want to paint some nodes green and when the users clicks over a green-selected node the node should go back to its original state.

    Thanks!

  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 01 Oct 2008 Link to this post

    Hi Ben,

    Try the following client side approach and see whether is working.

    JS:
    var tree = $find("<%= RadTreeView1.ClientID %>"); 
          for (var i=0; i<tree.get_nodes().get_count();i++)    
          {          
             var node = tree.get_nodes().getNode(i);          
             node.get_element().className="MyClass"
              
           } 

    Style.css
    <head runat="server"
        <title>Untitled Page</title> 
        <style type="text/css" > 
         .MyClass 
         { 
           color:#93b45c; 
         } 
        </style> 


    Thanks
    Shinu.
Back to Top