How to reset TextBox after cancelling filtering

4 posts, 0 answers
  1. David
    David avatar
    46 posts
    Member since:
    Nov 2008

    Posted 28 Dec 2012 Link to this post


    I have a RadCombox with IsFilteringEnabled =True and CanAutocompleteSelectItems = False
    When I open the drop down, I can starting typing in the text box to filter the listing but nothing is selected until I press enter. If I decide to cancel the filtering by closing the drop down, the text that I typed stilled remains.

    How can I get the text to revert back to the selected item?
    I tried UpdateTarget in the code-behind but since the selection has not changed, this had no affect.

  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 03 Jan 2013 Link to this post

    Hello David,

    I have tested the described scenario and really the text remains when the dropdown is closed with the arrow button, but it is reverted to the SelectedItem as soon as the ComboBox loses the focus.  Is this the same behavior as in your case?

    Kind regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. David
    David avatar
    46 posts
    Member since:
    Nov 2008

    Posted 05 Jan 2013 Link to this post

    Yes, that is the same behavior.
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 07 Jan 2013 Link to this post

    Hello David,

    Actually this is the expected behavior - the value in the input field of the ComboBox is updated when it loses the focus.  I am afraid that there is no easy way to workaround it.

    Kind regards,
    Yana
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top