Hello,
I am building a tree programmatically. After adding all of the items i would like to select one of them and to scroll to it (ensure that it is visible). i am using the node object (RadTreeViewItem) to set the IsSelected property to true, and then use the EnsureVisible method. The node is indeed selected. However any methods that are registered to the Selected event are not invoked. In addition, the item stays invisible and manual scrolling is required.
Any ideas?
thanks,
Liat.
5 Answers, 1 is accepted
0
Hi Liat,
About selecting and showing the item please preview the Expanding a Databound TreeView initially article. There is a working example too.
About the selected event please note if the container is not constructed then the Selected event is not raised. Instead you can rely on the SelectionChanged event of the TreeView control.
Sincerely yours,
Ivan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
About selecting and showing the item please preview the Expanding a Databound TreeView initially article. There is a working example too.
About the selected event please note if the container is not constructed then the Selected event is not raised. Instead you can rely on the SelectionChanged event of the TreeView control.
Sincerely yours,
Ivan
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
GiWorking
Top achievements
Rank 1
answered on 22 Aug 2012, 05:25 PM
The solution is missing, the link does not function.
I would appreciate to see it.
I would appreciate to see it.
0
Hello Jean-Marc,
This is an old thread and the link and the approach it described, don't work anymore. Instead, you can have a look at this blog post describing the RadTreeView.BringPathIntoView method. If you need to bring virtualized items into view, this method is your best choice. As the solution attached in the blog is targeting Silverlight, I've attached its WPF version here.
All the best,
Tina Stancheva
the Telerik team
This is an old thread and the link and the approach it described, don't work anymore. Instead, you can have a look at this blog post describing the RadTreeView.BringPathIntoView method. If you need to bring virtualized items into view, this method is your best choice. As the solution attached in the blog is targeting Silverlight, I've attached its WPF version here.
All the best,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
GiWorking
Top achievements
Rank 1
answered on 22 Aug 2012, 05:49 PM
Hello Tina,
Do you have a wpf version of this example that you from this blog :
http://blogs.telerik.com/xamlteam/posts/11-01-12/treeview-bringintoview.aspx
I do not have silverlight.
thanks
Jean-Marc
I wish to thank you for the code you sent me, I found a solution to that works fine with the IEventAggregator.
Thanks,
Do you have a wpf version of this example that you from this blog :
http://blogs.telerik.com/xamlteam/posts/11-01-12/treeview-bringintoview.aspx
I do not have silverlight.
thanks
Jean-Marc
I wish to thank you for the code you sent me, I found a solution to that works fine with the IEventAggregator.
Thanks,
0
Hello Jean-Marc,
Tina Stancheva
the Telerik team
I'm glad the solution helps. Let me know if I can further assist you.
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.