6 Answers, 1 is accepted
I have created a sample that shows how to achieve the described scenario. The solution works in both scenarios: DisplayMode="Plain" or the DisplayMode="Tokens".
Please take a look at the attached project and let me know if you have any additional questions on this.
The problem is that we are using Xamarin Forms and i need to have my events in the ViewModel and nothing in the back code .
So I want to get the SelectedItem in my ViewModel where i can create and fire my event . I saw your example but it is not what i am looking for .
Currently, the RadAutoCompleteView does not provide a command equivalent to the SuggestionItemSelected event. In this case you will need to use a Xamarin.Forms EventToCommandBehavior.
You'll get the event args as a command parameter and add the selected item to the RadDataGrid ItemsSource.
Please take a look at the attached project how this could be achieved and let me know if you have any additional questions or concerns.
It worked perfectly , exactly what i was looking for .
No , at the moment that i want to remove a selected item , i want to remove it from the grid too .
Is there any way to do this ?
I have modified the attached project regarding how to Add and Remove items to the RadDataGrid using the Tokens Collection of the AutoCompleteView control. Please take a look at the MyConverter.cs and MainPage.xaml files how this could be achieved.
I hope this could help.