Hi,
Do you need only selection to be made or you need selection + bringing the item in the viewport ?
If you need just selection without viewing the selected items, you can use ViewModels, introduce boolean property in the ViewModel and bind it to the IsSelected property of the RadTreeViewItems via ContainerBindings.
The ContainerFromItemRecursive method returns the visual Container ( the RadTreeViewItem that contains info about your business object/ item/ ViewModel). It will return null in all scenarios in which the container is not yet generated. If the dropdown button has never been opened, the RadTreeView has never been loaded and no RadTreeviewItems have been generated.
So I suggest you to first open the DropDownButton and then use the BringPathIntoView method, which will bring a desired item into view event if it hasn't been prepared yet (it will be prepared since its parent containers will be expanded by the method's logic).
Regards,
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>