Autocomplete inside ListView

2 posts, 0 answers
  1. Tahmina
    Tahmina avatar
    1 posts
    Member since:
    Oct 2018

    Posted 18 Oct 2018 Link to this post

    Hi I am new to xamarin forms. How can I use selecteditem for the multiple Autocomplete controller which are inside a Listview already




    <telerikDataControls:RadListView x:Name="listView" ItemsSource="{Binding QuantityRows}"  ItemTapped="Item_Selected" Grid.Row="1">
                                      <Label Text="{Binding FieldDescription}"></Label>
                                        <telerikInput:RadAutoComplete x:Name="autoCompleteWatermark"                                                         

                                                              ItemsSource="{Binding Listing}" 
                                                              NoResultsMessage="there are no matching items..." 
                                                              Watermark="Search here..." />

  2. Didi
    Didi avatar
    256 posts

    Posted 23 Oct 2018 Link to this post

    Hi Tahmira,

    Thank you for the provided code.

    I have created a sample example how to achieve the described approach using the new AutoCompleteView control.  We'd recommend AutoCompleteView as it provides more features and is more intuitive compared to the old AutoComplete control.

    In short, what you need to change is the binding of the ItemsSource of the AutoCompleteView as when the control is placed inside an ItemTemplate, its binding context is the corresponding data item of the ListView source.  Using Source property of the binding you could reference the ListView itself and bind to its SelectedItems collection.

    Please take a look at it and let me know if you have any other questions.

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