This is a migrated thread and some comments may be shown as answers.

How to use LoadOnDemand Event?

3 Answers 59 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Harsh
Top achievements
Rank 1
Harsh asked on 02 Feb 2009, 07:53 AM
Hi,
   I have seen the demo of load on demand in your site but it uses Expanded event. There is event called LoadOnDemand in treeview, so my Question is how can we use this event to load child nodes on demand.

Also when I use Expanded event how will I know which parent node is been clicked .

 

private void RadTreeView_Expanded(object sender, Telerik.Windows.RadRoutedEventArgs e) {

 

 

    RadTreeView objRadTreeView = sender as RadTreeView;
}

 

3 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 02 Feb 2009, 07:56 AM
Hi Harsh,

Here are two blog posts with sample applications that demonstrate the LoadOnDemand event:
http://blogs.telerik.com/valerihristov/posts/08-10-08/Silverlight_TreeView_Load_on_Demand.aspx

http://blogs.telerik.com/valerihristov/posts/08-10-09/RadControls_for_Silverlight_Demo_with_ADO_NET_Data_Services.aspx

All the best,
Valeri Hristov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Harsh
Top achievements
Rank 1
answered on 02 Feb 2009, 08:03 AM
I forgot to mention that I am using collection to bind my tree and uing WPF tree view so it would be helpful If you provide demo in it. Also I want ot know when LoadOnDemand event is called for a treeview?
0
Tihomir Petkov
Telerik team
answered on 03 Feb 2009, 12:57 PM
Hi Harsh,

The RadTreeView.LoadOnDemand event occurs when a child treeview item is loading its child items on demand, which occurs when the IsLoadOnDemand property of an item is set to true and that item is expanded.

As for binding to a collection, here is a blog post demonstrating that:
http://blogs.telerik.com/ValentinStoychev/Posts/08-08-05/How_to_Databind_RadTreeView_in_WPF.aspx

Best wishes,
Tihomir Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
Harsh
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Harsh
Top achievements
Rank 1
Tihomir Petkov
Telerik team
Share this question
or