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?

example of looking do.

if using mvvm pattern. here steps:

  • declare observablecollection<itemtype> each of drop down lists in viewmodel.
  • create selectedtype1, selectedtype2 etc. 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> searchresults in viewmodel holds search results given search.
  • declare searchcommand property in viewmodel executes search method.
  • declare search method 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 searchresults collection.
  • bind searchresults collection listview.itemssource in view.
  • bind searchcommand search action button (top right button in view).

happy coding!


Comments

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -