Hi Hussein,
If the
ContainerFromItemRecursive() method returns null that means that either the item isn't in the ItemsSource of the
RadTreeView or the containers aren't yet generated.
Basically you need to keep in mind that this method can only be used when the
RadTreeView.
ItemContainerGenerator has finished generating the containers for the business items. You can handle the
ItemContainerGenerator.StatusChanged event to get the container of an item only if the status of the
ItemContainerGenerator is
ContainersGenerated:
However, as I am not sure how you use the
ContainerFromItemRecursive() method, I am not sure what is causing your issues. But if you can send us a sample demonstrating your scenario, we'll be able to further investigate your case.
Greetings,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>