Hi Robin Verhulst,
I noticed that you are using the ItemContainerGenerator to get the item containers. Please note that these containers will not be generated until needed (until visible), but you can handle the ItemContainerGenerator.StatusChanged event and be notified when they are generated.
Example code for getting the containers:
sender, EventArgs e)
(myTreeView.ItemContainerGenerator.Status == GeneratorStatus.ContainersGenerated)
//the custom logic goes here
//When the item is a direct child of the TreeView:
//When the item is a descendant of the TreeView (i.e. child of a child...)
After you get the items container you need you should be able to set the DefaultImageSrc like you do.
Is the ItemContainerGenerator generated when you are accessing the containers? Also, you can go through those threads here
, they might be helful.
Let us know if this is the problem. Also, if this information doesn't help, if you can send us your project or a sample project reproducing your issues, we will investigate them further and help you implement your scenario.
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Telerik Public Issue Tracking
system and vote to affect the priority of the items.