filterable - search more than one field

2 posts, 0 answers
  1. Max
    Max avatar
    3 posts
    Member since:
    Jan 2014

    Posted 16 Jan 2014 Link to this post

    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.
  2. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2564 posts

    Posted 17 Jan 2014 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top