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

Does the RadTreeview can be binded to RadComboBox using Silverlight 4.0?

4 Answers 54 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Princess
Top achievements
Rank 1
Princess asked on 19 Jul 2011, 07:43 AM
Hi Telerik,

Currently in my current engagement, I was ask to study which is the better control to use in implementing a dropdown wherein the items inside that is in a TreeView Style. 

So, I write this email to seek for your technical expertise regarding on the features that RadComboBox for Silverlight can offer. Here are my questions:

1. I've seen some sample project in your forum about binding the RadTreeView to RadComboBox (using   Silverlight 3). But in your official demo site, there is no sample demo or code in your site about that feature. Just want to ask, Does the RadTreeView still can be bind to RadComboBox? Is that still supported? If yes can you send us some latest sample project? (Hopefully you have one using Silverlight 4) =)

2. What do you think wil be better approach, to use RadComboBox or use the RadDropDownButton when implementing that feature? Because on what we see, You only have sample demo about RadDropDownButton binded to RadTreeView.

Hoping for your quick response, Thank you. :)

Regards,
Princess Grace Dimaculangan

4 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 19 Jul 2011, 08:05 AM
Hi,

I would recommend using a DropDownButton instead of a ComboBox because it is much easier and you get the same functionality. The example with RadComboBox was created in the past, when we did not have DropDownButton control...

Regards,
Valeri Hristov
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!

0
Princess
Top achievements
Rank 1
answered on 19 Jul 2011, 08:16 AM
Thanks Valeri on your quick response. We will be using the RadDropDown button as per your advise. Thank you. :)
Btw, i would to add 1 more question about the feature of RadDropDown, see scenario below:

In my dropdown I have a treeview that contains the following items:

Item A
    Item AA1
           Item AAA1
    Item AA2
    Item AA3
            Item AAA3    
Item B
    Item BB1
    Item BB2
            Item BBB2
    Item BB3

Then I select Item AAA1, so the dropdown will display Item AAA1 as seleted item.
Is it possible to display the full path as selected item, like this-> Item A\Item AA1\Item AAA1

Thank you! :)
0
Petar Mladenov
Telerik team
answered on 21 Jul 2011, 03:59 PM
Hello Princess,

 You can use the SelectionChanged event of the RadTreeView and set the Content of the RadDropDownButton.
If you tree is declarative you will have to build this string path by using the RadTreeViewItem.Parent property.
If the tree is bound to collection of ViewModels/BusinessObjects , you can create function that builds this path recursively. You can examine similar approach in this blog post.
Please let us know if you need further assistance. 

Regards,
Petar Mladenov
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!

0
Princess
Top achievements
Rank 1
answered on 22 Jul 2011, 06:59 AM
Thanks on your response. I will try your suggestion. :) I will get back to you again if ever i found any issues.
Tags
ComboBox
Asked by
Princess
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Princess
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or