Let me first start with that in the SelectionChanged
event the RadTreeViewItem container for the newly added business object is still not generated. In order to force the tree node to be created, you can call the GetItemByPath()
method. You can take a look at the Get Item By Path
help article in our documentation where this method is further described. Keep in mind in order to use this method you need to know the path of the added node.
Another approach which you can try is to subscribe to the ItemPrepared
event of the RadTreeView. This event is called when a child of the RadTreeView has been prepared and is now ready for use. You can take a look at the Working with ItemPrepared Event
for further information.
sender, RadTreeViewItemPreparedEventArgs e)
var item = e.PreparedItem
Hope this information is helpful.
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer
and share your thoughts.