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

2 posts, 0 answers
  1. debasish
    debasish avatar
    1 posts
    Member since:
    Feb 2017

    Posted 01 Feb Link to this post

    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.

     

  2. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    327 posts

    Posted 06 Feb Link to this post

    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.
Back to Top