Can I know when was the latest version of RadTreeView posted?CssClass is being applied but where as SelectedCssClass and HoveredCssClass is not being applied even though .rtln is given beside the class specified in the stylesheet.
Can anyone help?
Can anyone help?
4 Answers, 1 is accepted
0
EBS
Top achievements
Rank 1
answered on 29 Jan 2009, 03:52 PM
I am having the same issue with the hovered style not applying. I am programatically creating the tree nodes and adding the .HoverCssClass in the code behind. I also added the .rtIn to the style. please advise.
<style> |
.myNodeCss |
{ |
color : red; |
} |
.myNodeHoveredCss .rtln |
{ |
color : blue !important; |
} |
.myNodeSelectedCss .rtln |
{ |
color: green !important; |
} |
</style> |
Dim AcctGroupNode As New RadTreeNode() |
AcctGroupNode.Checked = True |
AcctGroupNode.Value = GroupRow("ag_type").ToString() |
AcctGroupNode.Expanded = True |
AcctGroupNode.Attributes.Add("level", "group") |
AcctGroupNode.CssClass = "myNodeCss" |
AcctGroupNode.HoveredCssClass = "myNodeHoveredCss" |
AcctGroupNode.SelectedCssClass = "myNodeSelectedCss" |
TopNodeLevel.Add(AcctGroupNode) |
0
Princy
Top achievements
Rank 2
answered on 30 Jan 2009, 10:26 AM
Hi,
Try the CSS selector .rtIn instead of .rtln in the styles and see whether its working fine. Checkout the links to the online documentation which explains about Skin CSS File and CSS Skin File Selectors.
CSS:
Thanks,
Princy.
Try the CSS selector .rtIn instead of .rtln in the styles and see whether its working fine. Checkout the links to the online documentation which explains about Skin CSS File and CSS Skin File Selectors.
CSS:
<style type="text/css"> |
.myNodeCss |
{ |
color : red; |
} |
.myNodeHoveredCss .rtIn |
{ |
color : blue !important; |
} |
.myNodeSelectedCss .rtIn |
{ |
color: green !important; |
} |
</style> |
Thanks,
Princy.
0
Peichung
Top achievements
Rank 1
answered on 15 Jul 2009, 05:12 PM
Hi,
The suggested solution does work. However, I databind my tree, so I have to loop through all the nodes right after data binding:
Is there more efficient way to do this if I want to apply the same style to all the nodes? Thanks,
Peichung
The suggested solution does work. However, I databind my tree, so I have to loop through all the nodes right after data binding:
foreach (RadTreeNode td in myTree.Nodes) |
{ |
td.SelectedCssClass = "treenode-selected"; |
td.HoveredCssClass = "treenode-hovered"; |
} |
Is there more efficient way to do this if I want to apply the same style to all the nodes? Thanks,
Peichung
0
Hi Peichung,
You can set the DataBindings of the RadTreeView:
I hope this helps.
Greetings,
Veselin Vasilev
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.
You can set the DataBindings of the RadTreeView:
<DataBindings> |
<telerik:RadTreeNodeBinding SelectedCssClass="treenode-selected" HoveredCssClass="treenode-hovered" /> |
</DataBindings> |
I hope this helps.
Greetings,
Veselin Vasilev
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.