The ContainerFromItemRecursive will return null if the Container (the RadTreeViewitem that you want to access is not prepared yet, in other word you have to ensure its creation by expanding its parent container. You can do something like so:
sender, RadRoutedEventArgs e)
RadTreeViewItem container = (sender
Organization org = container.Item
Department dept =
"new Department to Edit!"
RadTreeViewItem newContainer = treeViewDepartments.ContainerFromItemRecursive(dept);
The described approach is realized in the attached solution. So please give it a try and let us know if it fits in your scenario.
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!