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

5 posts, 0 answers
  1. Princess
    Princess avatar
    4 posts
    Member since:
    Jul 2012

    Posted 19 Jul 2011 Link to this post

    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
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 19 Jul 2011 Link to this post

    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!

  3. DevCraft banner
  4. Princess
    Princess avatar
    4 posts
    Member since:
    Jul 2012

    Posted 19 Jul 2011 Link to this post

    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! :)
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 21 Jul 2011 Link to this post

    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!

  6. Princess
    Princess avatar
    4 posts
    Member since:
    Jul 2012

    Posted 22 Jul 2011 Link to this post

    Thanks on your response. I will try your suggestion. :) I will get back to you again if ever i found any issues.
Back to Top
DevCraft banner