Combo Box separator

2 posts, 0 answers
  1. Thomas
    Thomas avatar
    2 posts
    Member since:
    Jul 2010

    Posted 03 Aug 2010 Link to this post

    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

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

    See below.

       -- Horse
       -- Elephant

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

    Posted 03 Aug 2010 Link to this post

    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:

    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
  3. DevCraft banner
Back to Top