xamarin.forms - Best practice in Xamarin Forms to perform a filter search -
i need perform filter search dynamic fields , not sure best way this.
we have lot of documents different fields , these used filter search.
can point me in right direction?

if using mvvm pattern. here steps:
- declare
observablecollection<itemtype>each of drop down lists in viewmodel. - create
selectedtype1, selectedtype2etc. properties selected values corresponding each drop down list. - attach selectionchanged , textchanged method handlers each drop down lists in view updates corresponding selection properties in viewmodel.
- delcare
observablecollection<searchresulttype> searchresultsin viewmodel holds search results given search. - declare
searchcommandproperty in viewmodel executessearchmethod. - declare
searchmethod makes web request call or local database search query depending on requirement. search method has access drop down selections/text typed user. - insert results obtained in search method
searchresultscollection. - bind
searchresultscollectionlistview.itemssourcein view. - bind
searchcommandsearch action button (top right button in view).
happy coding!
Comments
Post a Comment