Hi,
I am using the IsFilteringEnabled functionality in the RadComboBox control to allow our users to filter on a list of items as they type.
I have hooked up the KeyDown event in the code behind to set the IsDropDownOpen to true so the user can see the filtered items when they type. The functionality works well apart from an unexpected side effect:
1. click in the combo box text box and start typing e.g. bb
2. the drop down expands and shows available items matching bb as the user types
3. press ESC button and the drop down closes and the cursor remains at the end of the bb text in the text box.
4. when the user continues to type to add c at the end i.e. bbc I would expect the list of items to show only those containing bbc text. What actually happens is that the text bb is automatically highlighted and when the user types c the letters bb are erased and filter searches for items containing the letter c. This is unexpected.
I would like stop this automatic text highlighting on a subsequent key press after pressing escape otherwise users will need to start their filter search from the beginning which is unnatural.
Thanks,
Chris
XAML
<telerik:RadComboBox x:Name="comboBoxCpty" Grid.Row="0" Grid.Column="1" ItemsSource="{Binding CptyList}"
IsFilteringEnabled="True"
IsEditable="True"
TextSearchMode="Contains"
SelectedValuePath="CptyCode"
DisplayMemberPath="Description"
SelectedValue="CptyCode"
KeyDown="ComboBoxCpty_OnKeyDown">
<telerik:RadComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</telerik:RadComboBox.ItemsPanel>
</telerik:RadComboBox>
Code Behind
private void ComboBoxCpty_OnKeyDown (object sender, KeyEventArgs e)
{
comboBoxCounterparty.IsDropDownOpen = true;
}
I am using the IsFilteringEnabled functionality in the RadComboBox control to allow our users to filter on a list of items as they type.
I have hooked up the KeyDown event in the code behind to set the IsDropDownOpen to true so the user can see the filtered items when they type. The functionality works well apart from an unexpected side effect:
1. click in the combo box text box and start typing e.g. bb
2. the drop down expands and shows available items matching bb as the user types
3. press ESC button and the drop down closes and the cursor remains at the end of the bb text in the text box.
4. when the user continues to type to add c at the end i.e. bbc I would expect the list of items to show only those containing bbc text. What actually happens is that the text bb is automatically highlighted and when the user types c the letters bb are erased and filter searches for items containing the letter c. This is unexpected.
I would like stop this automatic text highlighting on a subsequent key press after pressing escape otherwise users will need to start their filter search from the beginning which is unnatural.
Thanks,
Chris
XAML
<telerik:RadComboBox x:Name="comboBoxCpty" Grid.Row="0" Grid.Column="1" ItemsSource="{Binding CptyList}"
IsFilteringEnabled="True"
IsEditable="True"
TextSearchMode="Contains"
SelectedValuePath="CptyCode"
DisplayMemberPath="Description"
SelectedValue="CptyCode"
KeyDown="ComboBoxCpty_OnKeyDown">
<telerik:RadComboBox.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel />
</ItemsPanelTemplate>
</telerik:RadComboBox.ItemsPanel>
</telerik:RadComboBox>
Code Behind
private void ComboBoxCpty_OnKeyDown (object sender, KeyEventArgs e)
{
comboBoxCounterparty.IsDropDownOpen = true;
}