This is a migrated thread and some comments may be shown as answers.

Filtering on multiple fields

1 Answer 72 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 1
Ian asked on 10 Sep 2013, 03:39 PM
Hi,
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

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 12 Sep 2013, 03:47 PM
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.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView (Mobile)
Asked by
Ian
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or