6 Answers, 1 is accepted
In my opinion paging is not a good option for a TreeView. It is also hard to achieve - we don't have such example or a way to do it. You'd better use the so called virtualization technique (check out the example) - can download for example all the 1000 ids from the server. Then start loading all the needed information for-each Id on the background, so when it is available - the binding will do the rest. Other approach could be to load a node when the actual container is created (realized) due to the virtualization.
Please let me know if we can be of further help regarding any approach you've choose.
Miro Miroslavov
the Telerik team

The RadTreeView doesn't have a built-in paging functionality. Instead it support UIVirtualization so that only the items in the viewport are generated (realized), as well as load-on-demand - in order to allow you to load the children items on demand - after expanding a parent item. Both of these features are designed to optimize the performance of the RadTreeView as much as possible and you can check out the demo Miro mentioned in the previous reply (http://demos.telerik.com/silverlight/#TreeView/Performance) where a million items are generated as the RadTreeView.ItemsSource collection.
However, if your goal is to use paging, then you'll have to use it in the collection you're loading. Basically the RadTreeView displays the entire length of its ItemsSource collection (although in virtualized mode, in every single moment it realizes only the items in the viewport area). So if you'd like to display only a number of items from your original collection, you'll have to create a sample collection containing only the desired number of items and set that sample collection as the RadTreeView.ItemsSource.
Regards,
Tina Stancheva
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

For the most part, I have this working as you suggested.
"So if you'd like to display only a number of items from your original collection, you'll have to create a sample collection containing only the desired number of items and set that sample collection as the RadTreeView.ItemsSource."
I implemented your suggestion, I created a VirtualCollection (derived from IList and set the total count, populating each item when requested). Works fine.
During the LoadOnDemand event, I create my virtual collection and then set the radTreeviewItem.ItemsSource=mycollection. This works fine until I collapse the parent node and re-expand. For example, if I have say three levels deep:
Person
Child
Dog
then collapse the Person node and expand it again, the Child node does appear, but there is no expanding button, and therefore no Dog node. It's almost like I need to reset the ItemsSource. I tried the below code with an ObservableCollection<Person> (instead of virtual), and it exhibited the same behavior. If I don't include a binding statement in my .xaml for the child nodes, it DOES NOT work. If I add a binding statement (Binding Path=Children) for example, it does work. Any suggestions????
private void radTreeView1_LoadOnDemand (object sender, Telerik.Windows.RadRoutedEventArgs e)
{
RadTreeViewItem radTreeViewItem = e.OriginalSource as RadTreeViewItem;
//service that will return viewmodels
var service = new PersonService (10/*count*/);
//create the virtual collection and set the ItemsSource
radTreeViewItem.ItemsSource = new VirtualCollection<
Person
> (service, 2/*page size*/);
//done loading
radTreeViewItem.IsLoadOnDemandEnabled = false;
}

Sorry, I may have this working. I'll let you know my status :-)
-Joe
How is your solution going? Did you manage to get it working? Let us know if you haven't so that we can assist you implementing your requirements.
Regards,
Tina Stancheva
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.