This is a migrated thread and some comments may be shown as answers.

Paiting multi-nodes with different color

1 Answer 53 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ben Turpin
Top achievements
Rank 1
Ben Turpin asked on 30 Sep 2008, 08:31 PM
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!

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 01 Oct 2008, 06:59 AM
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.
Tags
TreeView
Asked by
Ben Turpin
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or