Filtering on multiple fields

2 posts, 0 answers
  1. Ian
    Ian avatar
    129 posts
    Member since:
    Jun 2009

    Posted 10 Sep 2013 Link to this post

    The Mobile ListView Filtering demo explains how to filter a datasource on a single field. I'm looking to filter a directory of users on two fields - I want to return a list of users when either their firstname OR surname starts with a search argument.

    Looking at forum posts for the Web ListView widget, it appears you can specify multiple search fields and associated logic condition (eg. And, Or).

    1. Does the Mobile ListView Filterable configuration allow you to specify two filter fields?
    2. If so, what would be the syntax to achieve this using the Mobile ListView MVC wrapper?

    Best regards, Ian
  2. Alexander Valchev
    Alexander Valchev avatar
    2895 posts

    Posted 12 Sep 2013 Link to this post

    Hi Ian,

    Currently it is not possible to define multiple search fields or to specify the logic condition through the configuration options.

    If you wish you could implement this with custom code. Basically you should include search input (HTML element) in the View, hook up to its change event (with jQuery) and use DataSource's filter method to filter the ListView's data.
    Since approach requires using client side API you should write it in JavaScript.

    Alexander Valchev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top