The application I am building is using .NET theme files to properly apply skins to various elements. My problem is simple:
In my skin file I have some items as follows:
In my skin file I have some items as follows:
<Telerik:RadTreeNode runat="server" SkinID="District" ImageUrl="images/icons/folder.gif" /> |
<Telerik:RadTreeNode runat="server" SkinID="Location" ImageUrl="images/icons/house.gif" /> |
What I would like to do, is based on the data being bound to the treeview is assign a different SkinID to each node as they are created.
My problem is that the 2 events I have to work with, NodeCreated and NodeDataBound, won't accomplish this. NodeCreated is too early because I can't determine the type of node being created because the DataItem value of e.Node is null. NodeDataBound is too late because the node has already been added to the Controls collection and the SkinID cannot be assigned.
How would I go about accomplishing this?
Thanks