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

radtreeview forecolor problem

1 Answer 69 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
raphael
Top achievements
Rank 1
raphael asked on 30 Sep 2008, 02:01 PM
Hi everybody,

I have a little problem with my treeview.

I populate my treeview on demand, when I open a node I perform a check and if this if true I set the forecolor of the node to red in the following way

RadTreeNode

node = new RadTreeNode();

node.ForeColor = System.Drawing.

Color.Red;

e.Node.Nodes.Add(node);

but as soon as I click on a node or perform an action on my contest menu the forecolor return to black.

Can somebody explain me what I'm doing wrong? or if it isn't possible to set a permanetly another forecolor?

Thank you very much

Raphael

1 Answer, 1 is accepted

Sort by
0
raphael
Top achievements
Rank 1
answered on 01 Oct 2008, 05:53 AM
I've just found out the solution by myself.

Instead of changing the node forcolor I set a new cssClass to the node:

node.CssClass =
"myclass";

And this works without any problems

bye

Tags
TreeView
Asked by
raphael
Top achievements
Rank 1
Answers by
raphael
Top achievements
Rank 1
Share this question
or