Hello Telerik!
I have my RadTreeView:
And I have binding in code behind where I set two attributes:
or
Also I set node images in code behind and it's bad.
So I want to do it right way in order to reduce traffic and use CSS for node image.
I tried:
but it does not work.
For example:
works perfectly fine for minus sign images.
Any ideas how can I do it? And It will be great if there was a way to select image depending on node attribute. I think I can manage to do it using javascript and DOM elements, but adding images using CSS still a question.
Thanks)
I have my RadTreeView:
<telerik:RadTreeView runat="server" ID="TreeViewUnit" CssClass="TreeView"
ShowLineImages="False" Skin="Forest"
OnDataBound="TreeViewUnit_DataBound"
OnNodeClick="TreeViewUnit_NodeClick"
meta:resourcekey="TreeViewUnitResource1">
And I have binding in code behind where I set two attributes:
item.Attributes["Item"] = "Unit";item.Attributes["Item"] = "Respondent";Also I set node images in code behind and it's bad.
item.ImageUrl = imageFolder + "folder-icon.png";
node.ImageUrl = imageFolder + "profile_icon.png";So I want to do it right way in order to reduce traffic and use CSS for node image.
I tried:
.RadTreeView .rtImg {
background-image: url("/Styles/images/plusminus_icon.png") !important;
}
.RadTreeView_Forest .rtImg {
background-image: url("/Styles/images/profile_icon.png") !important;
}but it does not work.
For example:
.RadTreeView_Forest .rtPlus, .RadTreeView_Forest .rtMinus {
background-image: url("/Styles/images/plusminus_icon.png") !important;
}works perfectly fine for minus sign images.
Any ideas how can I do it? And It will be great if there was a way to select image depending on node attribute. I think I can manage to do it using javascript and DOM elements, but adding images using CSS still a question.
Thanks)