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

Radcombobox text reverts to selected text value after edit and pressing tab

1 Answer 176 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
debasish
Top achievements
Rank 1
debasish asked on 01 Feb 2017, 11:50 AM

We are using the version 2015.1.401.1050 of Telerik controls. We have a radcombobox with an Itemsource containing multiple values as follows

<telerik:RadComboBox x:Name="MyRadComboBox" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center"
                DisplayMemberPath="ConfigName" Margin="20,0,10,0" IsEditable="True" HorizontalAlignment="Left"
                ItemsSource="{Binding Path=ProductConfigurations}" StaysOpenOnEdit="True"
                SelectedItem="{Binding Path=SelectedConfiguration, Mode=TwoWay}"
                Text="{Binding ConfigName, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True}"
                TextSearchMode="StartsWithCaseSensitive" OpenDropDownOnFocus="False" Width="450" 
                KeyDown="MyRadComboBox_KeyDown" telerik:AnimationManager.IsAnimationEnabled="False" CanAutocompleteSelectItems="False">
                <interactivity:Interaction.Triggers>
                    <interactivity:EventTrigger EventName="LostFocus">
                        <interactivity:InvokeCommandAction 
                            Command="{Binding RadComboboxLostFocusCommand}" CommandParameter="{Binding Text, 
                            ElementName=MyRadComboBox}" />
                    </interactivity:EventTrigger>
                </interactivity:Interaction.Triggers>
            </telerik:RadComboBox>

Here is the code in the xaml.cs

private void MyRadComboBox_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
        {
            if (!MyRadComboBox.IsDropDownOpen)
                MyRadComboBox.IsDropDownOpen = true;
        }

The issue I am facing is as follows:

1) I am opening radcombobox drop down , selecting one value from the drop down say "TestDeb"

2) Now i am trying to edit my selected item by using backspace say the new name is "Test"

3) After that on pressing tab or moving out of the editable combobox, the auto complete feature of the radcombobox triggers unnecessarily and my text("Test") changes to the original text("TestDeb") i.e. the text value from the dropdown of radcombobox.

Its been so frustrating for me and has almost become a showstopper in my Product Development. In ideal scenario, the auto complete behavior should not fire once user have edited the selected item and came out of the control, but here owing to the triggering of the auto complete behavior, the edited text gets reverted back to the original selected item from the drop down. The command binding on lost focus is done to write some business logic related to other controls on the basis of the text value in the editable combo box which is again failing because of the issue in the radcombobox.

 

Please help in providing a quick solution.

 

1 Answer, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 06 Feb 2017, 08:22 AM
Hi Debashish,

I tried reproducing the issue you are experiencing but was not able to. Would it be possible to raise a ticket with a sample project that shows the undesired behavior so we can have a more detailed look and advise you appropriately? 

Generally, you can disable the Autocomplete functionality of the RadComboBox by settings the IsTextSearchEnabled property to False. Would this work for you? 

Regards,
Stefan Nenchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ComboBox
Asked by
debasish
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Share this question
or