WPf RadComboBox jump entry that matches single character typed by the user

1 Answer 182 Views
ComboBox
Paul
Top achievements
Rank 2
Iron
Iron
Iron
Paul asked on 17 Sep 2021, 11:08 AM

https://www.telerik.com/products/wpf/combobox.aspx

The doc above has "if you press a single character, it navigates to the first item starting with that character"

What properties are required to make the RadComboBox work in this way?
I've tried IsTextSearchEnabled="True" and TextSearchMode="StartsWith" but it does not work

I'm guessing that there may be a property to tell it to clear the first letter entered when the user enters another one
e.g. If user enters A then B they want to go to the first entry that starts with B

I have a RadComboBox.ItemTemplate to tell it which property to display
Do I also need to set something to tell it which property to match the typed character against?

1 Answer, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 20 Sep 2021, 12:53 PM

Hello Paul,

When using the RadComboBox with a custom ItemTemplate set, the control does not know which property to use for auto-complete. In order to achieve the wanted behavior, you could set the telerik:TextSearch.TextPath attached property to the control. And then specify which value you want to use for AutoComplete

That said, I have prepared a sample project that has a custom item template set to the control, and the aforementioned attached property is utilized.

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Paul
Top achievements
Rank 2
Iron
Iron
Iron
commented on 20 Sep 2021, 02:36 PM

Great work, thank you.
telerik:TextSearch.TextPath is exactly what I was looking for.
Tags
ComboBox
Asked by
Paul
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Stenly
Telerik team
Share this question
or