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

back color when node disabled

2 Answers 98 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Shirya
Top achievements
Rank 1
Shirya asked on 05 Mar 2009, 03:29 PM
Hello,
When I create a TreeView via code and  a node is disabled, his backColor become "gray-gradient".
But if the Treeview is created in design, there is not backColor .
How can i have the same "Disabled Style" as if i create my treeView via Design ?
Thank you

2 Answers, 1 is accepted

Sort by
0
Shirya
Top achievements
Rank 1
answered on 10 Mar 2009, 02:13 PM
there is no way?
0
Victor
Telerik team
answered on 10 Mar 2009, 05:35 PM
Hi Shirya,

Thank you for writing.
Please excuse us for the late reply. We have been really busy lately with the preparations for the new release Q1 2009.

As to your question, you experience the described behavior because when you create your RadTreeView through code, it has no theme set. You can address your issue by setting the ThemeName property of your tree view to "ControlDefault" after you add it to your controls collection.
RadTreeView tree2 = new RadTreeView();  
            tree2.Nodes.Add(new RadTreeNode());  
            tree2.Nodes.Add(new RadTreeNode());  
            tree2.Nodes.Add(new RadTreeNode());  
            tree2.Nodes.Add(new RadTreeNode());  
            tree2.Nodes.Add(new RadTreeNode());  
            tree2.Enabled = false;  
 
            this.Controls.Add(tree2);  
            tree2.ThemeName = "ControlDefault"

Please write back if you need further assistance.

Best wishes,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Treeview
Asked by
Shirya
Top achievements
Rank 1
Answers by
Shirya
Top achievements
Rank 1
Victor
Telerik team
Share this question
or