radtreeview forecolor problem

2 posts, 0 answers
  1. raphael
    raphael avatar
    36 posts
    Member since:
    Feb 2008

    Posted 30 Sep 2008 Link to this post

    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

  2. raphael
    raphael avatar
    36 posts
    Member since:
    Feb 2008

    Posted 01 Oct 2008 Link to this post

    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

Back to Top