RadComboBox selected item not showing

2 posts, 0 answers
  1. Morgan
    Morgan avatar
    4 posts
    Member since:
    Dec 2011

    Posted 15 Mar 2012 Link to this post

    I have a radcombobox in which the items are set in xaml. Each item is a stackpanel with two colored rectangles to simulate a color pallet.

    When an item is selected, it is not displayed in the radcombobox. I have tried this with Silverlight's default combobox, and it works as expected.
    Do Silverlight's ComboBox control and the RadCombobox typically behave differently in this way? What could be causing the different behaviors?

    <telerik:RadComboBox HorizontalAlignment="Left" Margin="28,344,0,0" Name="radComboBox1" VerticalAlignment="Top" Width="250">
                <telerik:RadComboBoxItem >
                    <StackPanel Orientation="Horizontal">
                        <Rectangle Fill="Red" Width="111" Height="20" />
                        <Rectangle Fill="Blue" Width="111"  Height="20"/>
                <telerik:RadComboBoxItem >
                    <StackPanel Orientation="Horizontal">
                        <Rectangle Fill="Green" Width="111" Height="20" />
                        <Rectangle Fill="Red" Width="111"  Height="20"/>
  2. Georgi
    Georgi avatar
    344 posts

    Posted 19 Mar 2012 Link to this post

    Hi Morgan,

    To display the selected item we are using SelectionBox. So the box doesn't know how to display the rectangles and you need to set SelectionBoxTemplate. How to achieve that you can see here.

    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft R3 2016 release webinar banner
Back to Top