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

Combo Box separator

1 Answer 69 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 03 Aug 2010, 10:40 AM
I have 2 observable collections. one contains list of items. and 2one contains subitems. one item may have multiple subitems (one to many relationship)
E.g.  1st collections: 1. Animal  2. Bird  3.Vgetable
Now , in 2nd collections has sub-items

Subitem number  Subitem name    Item Number
1                             Horse                   1
2                             Elepahant            1
3                              Parrot                  2
etc...

 Now, on combo box i want to show each subitems under head of its corresponding Itemnumber.

See below.

  Animal
   -- Horse
   -- Elephant
 Bird
  --Parrot

While each item number is a separtor over here and  must be disbaled but sub-itemnumber must be enabled.

  How to achieve all these things in silverlight

1 Answer, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 03 Aug 2010, 01:54 PM
Hello Thomas,

Since RadComboBox has only one ItemsSource, you should merge the two collections into one, apply some kind of sort, so they appear in the correct order, then using a StyleSelector apply different styles on the "separator" items and the normal items:
http://www.telerik.com/help/silverlight/common-data-binding-style-selectors.html

Best wishes,
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
Thomas
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Share this question
or