Changing text color of individual node in tree
New DiscussionHow can I change the text colour for a specific node?
I can change the background colour with
nde.Attributes.CssStyle.Add(HtmlTextWriterStyle.BackgroundColor, “yellow”)
but what about the text colour? Having looked at the code generated, I can see that the difficulty is that we need to set the text colour for the anchor within the node and I cannot determine the appropriate css override.
I suspect that the problem occurs because we have the following style class:
a:link
{
color: #000000;
}
Is there anyway to override this setting for a specific node in the tree.
What we want to achieve is to set some nodes to grey text to have the appearance of being disabled. We cannot make them actually disabled because we need to be able to navigate to child nodes which themselves are not disabled.
With the UltraWebTree we simple used:
nde.Style.CssClass = CssClass.TreeViewDisabledNode
We are attempting to remove these now obsolete controls and are using 11.2.2086.