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

Change text colour in treeview

1 Answer 137 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Alan
Top achievements
Rank 1
Alan asked on 11 Jul 2012, 11:00 AM
In a radtreeview I need to change the text colour when expand. i.e. nodes should have a different colour if it get expanded once.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Jul 2012, 12:08 PM
Hi Alan,

Try the following Javascript to achieve your scenario.

JS:
<script type="text/javascript">
function OnClientNodeExpanding(sender, args)
 {
  args.get_node()._applyCssClass("newClass");
 }
</script>

CSS:
<style type="text/css">
.newClass
 {
  color:Blue;
 }
</style>

Hope this helps.

Thanks,
Princy.
Tags
TreeView
Asked by
Alan
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or