Working of Backspace/Delete keys in RadComboBox and RadRibbonComboBox

3 posts, 0 answers
  1. Srinivas
    Srinivas avatar
    9 posts
    Member since:
    Sep 2014

    Posted 26 Mar 2015 Link to this post

    Hi,

    I have a RadCombobox and RadRibbonComboBox, with combobox being the ancestor.

    <telerik:RadRibbonComboBox x:Name="RadComboBoxSearchText" Grid.Row="0" Grid.Column="2" Margin="4" MinWidth="120" VerticalContentAlignment="Center"
                                        HorizontalAlignment="Stretch" VerticalAlignment="Top" IsSynchronizedWithCurrentItem="False" BorderThickness="1,1,1,1"
                                        EmptyText="Search..." IsEditable="True" Text="{Binding SearchProvider.FreeText, UpdateSourceTrigger=PropertyChanged}" ItemsSource="{Binding SearchProvider.SearchHistory}"
                                        MaxWidth="{Binding IsCompact, Converter={StaticResource BoolToWidthConverter}, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type search:XXXView}}}" telerik:AnimationManager.IsAnimationEnabled="false">
                <telerik:RadRibbonComboBox.InputBindings>
                    <KeyBinding Key="Enter" Command="{Binding XXXX}" CommandParameter="True" />
                </telerik:RadRibbonComboBox.InputBindings>
            </telerik:RadRibbonComboBox>



    <telerik:RadComboBox x:Name="RadComboBoxSearchText" Grid.Row="0" Grid.Column="2" Margin="4" MinWidth="120" VerticalContentAlignment="Center"
                                        HorizontalAlignment="Stretch" VerticalAlignment="Top" IsSynchronizedWithCurrentItem="False" BorderThickness="1,1,1,1"
                                        EmptyText="Search..." IsEditable="True" Text="{Binding SearchProvider.FreeText, Mode=TwoWay,NotifyOnSourceUpdated=True,NotifyOnTargetUpdated=True, UpdateSourceTrigger=PropertyChanged}" ItemsSource="{Binding SearchProvider.SearchHistory}"
                                        telerik:AnimationManager.IsAnimationEnabled="false">
                <telerik:RadComboBox.InputBindings>
                    <KeyBinding Key="Enter" Command="{Binding XXXX}" CommandParameter="True" />
                </telerik:RadComboBox.InputBindings>
            </telerik:RadComboBox>


    If I enter any text in the ribbon, they are getting reflected in in radcombobox. But the delete/backspace ones are not reflecting as it is.
    I have notified the property change , it was working fine with all the other keys except Del and Backspace.

    Regards,
    Srinivas M






  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 27 Mar 2015 Link to this post

    Hello Srinivas,

    Thank you for contacting us.

    The described behavior is an expected one in the current version of the RadComboBox and RadRibbonComboBox controls. Our ComboBox controls supports out of the box searching which is by default enabled. This feature can be disabled by setting the IsTextSearchEnabled to False, for more details please refer this help article.

    The reason for the experienced behavior is because when the second ComboBox is getting its Text property from the first one, it:
    • Automatically triggers its searching feature with the new text
    • Tries to find an matching item
    • If there is such item it is selected
    • Finally the Text of the RadComboBox is updates to match the text of the found item

    I recorded a short video showing the described behavior. Note that when the IsTextSearchEnabled is set to True (its default value) the first item found by the searching functionality is automatically selected in the second ComboBox. If the IsTextSearchEnabled  is set to False there is no longer any selection and the text is exactly as it is in the first ComboBox.

    Hope this is helpful.

    Regards,
    Vladi
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. Srinivas
    Srinivas avatar
    9 posts
    Member since:
    Sep 2014

    Posted 30 Mar 2015 in reply to Vladi Link to this post

    Thanks Vladi
    It is working 
Back to Top