Hard to select RadMenuItem in RadComboBox

2 posts, 0 answers
  1. carlos
    carlos avatar
    1 posts
    Member since:
    Jul 2015

    Posted 03 Aug 2015 Link to this post

    I add RadMenuItem inside RadComboBox as below code & screenshot, however, there are 2 borders in the dropdownitem when i selected( please refer to the screenshot-> Red Category), and i can't select the dropdownitem when i click the text in the inner border. It only can be selected by click the outer border. please help to advise. thanks.



    <telerik:RadComboBox  ItemsSource="{Binding Categories}" SelectedItem="{Binding Occurrence.Appointment.Category, Mode=TwoWay}"  Width="136" MinHeight="22"   BorderThickness="0" HorizontalContentAlignment="Left" DisplayMemberPath="CategoryName">
                              <TextBlock Text="{Binding CategoryName}"></TextBlock>
                                   <Rectangle Width="14" Height="14"  HorizontalAlignment="Left" VerticalAlignment="Center" Fill="{Binding CategoryBrush}" />

  2. Nasko
    Nasko avatar
    727 posts

    Posted 05 Aug 2015 Link to this post

    Hello Carlos,

    The observed by you behavior is an expected one as you are actually clicking on the RadMenuItem not on the RadComboBoxItem - thus no item is selected. What we could suggest you in order to achieve the desired functionality and behavior is to handle the Click event of the MenuItem. Inside the implementation of the event to get DataContext of the clicked MenuItem which represents the item you like to select and set the SelectedItem property of RadComboBox with it.

    We have created a sample project that demonstrates the described above approach and you could run and evaluate it.

    Hopes this helps.

    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 Feedback Portal and vote to affect the priority of the items
Back to Top