Hi all,
I'm trying to set both the background color and image of a TreeView node by binding to fields that are returned in my datasource.
In the sample code beneath, the CssClass is correctly bound and my background color is set as required. However, the treenode image is NOT correctly displayed.
If I reverse the data bindings so that they look like this, the treenode image is correctly applied but the CSS class is not applied.
Is there anything that I can do to apply both a treenode image and CSS class?
The important thing for me is to be able to apply a treenode *background color* and image so any suggestions of how to work around this (perhaps by not using a CSS class) would be appreciated.
Many thanks,
Tim
I'm trying to set both the background color and image of a TreeView node by binding to fields that are returned in my datasource.
In the sample code beneath, the CssClass is correctly bound and my background color is set as required. However, the treenode image is NOT correctly displayed.
<
telerik:RadTreeView
ID
=
"RadTreeView3"
runat
=
"server"
DataSourceID
=
"dsTreeSQL"
DataFieldID
=
"UniqueId"
DataFieldParentID
=
"parentid"
DataTextField
=
"NodeText"
>
<
ContextMenus
>
</
ContextMenus
>
<
DataBindings
>
<
telerik:RadTreeNodeBinding
CssClassField
=
"CssClass"
/>
<
telerik:RadTreeNodeBinding
ImageUrlField
=
"ImageURL"
/>
</
DataBindings
>
</
telerik:RadTreeView
>
If I reverse the data bindings so that they look like this, the treenode image is correctly applied but the CSS class is not applied.
<
DataBindings
>
<
telerik:RadTreeNodeBinding
ImageUrlField
=
"ImageURL"
/>
<
telerik:RadTreeNodeBinding
CssClassField
=
"CssClass"
/>
</
DataBindings
>
Is there anything that I can do to apply both a treenode image and CSS class?
The important thing for me is to be able to apply a treenode *background color* and image so any suggestions of how to work around this (perhaps by not using a CSS class) would be appreciated.
Many thanks,
Tim