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

Disabled tree node color

2 Answers 65 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Dustin
Top achievements
Rank 1
Dustin asked on 28 Mar 2011, 07:59 PM
I am trying to change the color of a disabled rad tree node to something other then the default.  I attempted the following

.Custom{
    color:red !important;
}
 
Protected Sub rtvNav_NodeDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadTreeNodeEventArgs) Handles rtvNav.NodeDataBound
        e.Node.Enabled = False
        e.Node.DisabledCssClass = "Custom"
    End Sub

but this did not override the color, i.e. the node is still gray.  I found the following post http://www.telerik.com/community/forums/aspnet-ajax/treeview/disabled-node-font-color.aspx but it is almost two years old and not sure if it still applies.  The solution is problematic for me as well.  The solution says to define 

.RadTreeView_Default .rtDisabled .rtIn
{
    color: black !important;
}

Problems:
1.  The user is allowed to select their own theme so I'd have to define this for all of Telerik's themes
2.  I only want to apply this to a specific tree in my application and not all the trees in my application.  There could be multiple trees on the same page, one with the new style, and multiple that should behave in the default way (i.e. disabled nodes grey).

What can I do to get disabled nodes to color differently in one situation and not the next?

2 Answers, 1 is accepted

Sort by
0
Dustin
Top achievements
Rank 1
answered on 31 Mar 2011, 11:33 PM
Bump
0
Nikolay Tsenkov
Telerik team
answered on 07 Apr 2011, 09:37 AM
Hello Dustin,

Could you, please, try the following:
.Custom .rtIn
{
    color: Red !important;
}


Kind regards,
Nikolay Tsenkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Dustin
Top achievements
Rank 1
Answers by
Dustin
Top achievements
Rank 1
Nikolay Tsenkov
Telerik team
Share this question
or