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

filterable - search more than one field

1 Answer 290 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Max
Top achievements
Rank 1
Max asked on 17 Jan 2014, 02:24 AM
Hello,

first of all thanks for this amazing framework!
I just have one quick question, because I am using your ListView and I would like to search for more than one field. I was reading through your documentation and it seems like there are a few differences in between the Web API and the Mobile API.

function viewInit(e) {
    e.view.element.find("#listView").kendoMobileListView({
        dataSource: [
            { id: 1, text: "foo" },
            { id: 2, text: "bar" }
        ],
        template: "id: #: id# with text: #: text#",
        filterable: [
            { ignoreCase: true, field: "text" },
            { field: "id" }
        ]
    });
}
This theoretically does not work, does it? Or am I doing anything wrong?
I would appreciate any further help!


Edit:
I know I could just use the operator and "contains" and put all the information in one string, but I was just wondering whether such thing was possible or not.

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 17 Jan 2014, 11:49 AM
Hi Max,

I am happy to hear that you like our product.

I am afraid that your configuration is not correct and the built-in filtering of the ListView does not support filtering by multiple fields. You can implement custom filtering using the filter() method of the dataSource and construct your own filters, but as I said there is no built-in support for this.

Regards,
Kiril Nikolov
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
Max
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or