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

TreeView inside combobox.

2 Answers 48 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Alexey
Top achievements
Rank 2
Alexey asked on 03 Apr 2010, 06:58 AM
I've read valeri hristov post about it: http://blogs.telerik.com/valerihristov/posts/09-08-27/treeview_in_combobox_take_3_silverlight_3_wpf_and_radcontrols.aspx

Everything is work nice expect SelectionBoxTemplate. It is not applied and that is why insted of text, class name of data item apper.

I'm using Silverligh 4 RC build.

2 Answers, 1 is accepted

Sort by
0
Alexey
Top achievements
Rank 2
answered on 03 Apr 2010, 09:19 AM
Valeri. I've got some modifications to your approach.

For combobox i have introduced attached property HierarchicalSelectedItem and then bind it to treeview inside its template

<Controls:RadTreeView x:Name="TreeViewSelector"
                                                          ItemTemplate="{TemplateBinding ItemTemplate}"
                                                          ItemsSource="{TemplateBinding ItemsSource}"
                                                          SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent},Path=(CBTV:ComboBoxExtensions.HierarchicalSelectedItem), Mode=TwoWay}"/>  

What you think about that?

0
Valeri Hristov
Telerik team
answered on 07 Apr 2010, 01:59 PM
Hi Alexey,

Your modification looks very nice, thank you for the heads-up. By the way, using RadDropDownButton you could achieve the same effect, without the need to retemplate RadComboBox, thus with very few lines of code. Please, let me know if you need a sample.

Sincerely yours,
Valeri Hristov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ComboBox
Asked by
Alexey
Top achievements
Rank 2
Answers by
Alexey
Top achievements
Rank 2
Valeri Hristov
Telerik team
Share this question
or