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

Working of Backspace/Delete keys in RadComboBox and RadRibbonComboBox

2 Answers 135 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Srinivas
Top achievements
Rank 1
Srinivas asked on 26 Mar 2015, 11:33 AM
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 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 27 Mar 2015, 02:27 PM
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.

 
0
Srinivas
Top achievements
Rank 1
answered on 30 Mar 2015, 07:11 AM
Thanks Vladi
It is working 
Tags
General Discussions
Asked by
Srinivas
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Srinivas
Top achievements
Rank 1
Share this question
or