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

Best way to insert custom item in the filtered list?

2 Answers 28 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Alexandre
Top achievements
Rank 1
Alexandre asked on 22 Jul 2015, 02:37 PM

Hi,

I use the autocompletebox, which have a list of country as ItemsSource. From this autocompletebox, I would have the possibility to add a new country, which is not in the current list. To do that, I want to have a custom item in the filtered list, which do something special and is selectable as an other item of the list.

I have the idea to add a special item in the ItemsSource and change the template of this special item with a TemplateSelector, but I would like to know if it exists a best way to do that?

I have attached a picture to illustrate what I would like to do.

Thanks for your help!

Alex

2 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 27 Jul 2015, 07:33 AM
Hello Alexandre,

It seems the approach you choose to use and came up with is a fine one. However, we also suggest you to check the following example from our online XAML SDK Repository which demonstrates how to add new items by using a Button:
https://github.com/telerik/xaml-sdk/tree/master/AutoCompleteBox/AddNewItemsWithButton

Hopes this helps.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Alexandre
Top achievements
Rank 1
answered on 28 Jul 2015, 10:39 AM

Hi!

That's not exactly what I searched, but I've found a workaround to manage that and it works fine

Thanks for your help!

Regards!

Alex

Tags
AutoCompleteBox
Asked by
Alexandre
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Alexandre
Top achievements
Rank 1
Share this question
or