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

Kendo Mobile Filterable ListView

9 Answers 359 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 06 Mar 2015, 01:01 AM
The following JavaScript is from the ListView / Filtering demo.

$("#filterable-listview").kendoMobileListView(
    dataSource: dataSource,
    template: $("#mobile-listview-filtering-template").text(),
    filterable: {
        field: "ProductName",
        operator: "startswith"
    },
    endlessScroll: true
});

I'd like to know how to do this with MVVM. I've also looked at this MVVM demo but I couldn't find an example of filtering anywhere. Please add an example somewhere!

Regards
Dean

9 Answers, 1 is accepted

Sort by
0
Dean
Top achievements
Rank 1
answered on 06 Mar 2015, 01:09 AM
I had tried a number of things but after posting this thread I figured it out:

data-filterable="{ field: 'ProductName', operator: 'startswith' }"

I still think an example should be included somewhere in the docs/demos.

Regards
Dean
0
Petyo
Telerik team
answered on 09 Mar 2015, 09:03 AM
Hi Dean,

your approach is correct - it is documented here.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Dean
Top achievements
Rank 1
answered on 09 Mar 2015, 10:05 PM
Hi Petyo,

I have read that part of the docs before but I wasn't sure if I needed to set data-filterable="true" because of this part of the listview api and then I was trying to do data-filterable-field="name". I'd like to see an additional example showing how to use filterable to really make it clear. I hope it's not just me that's had some trouble getting it.

Kind regards
Dean
0
Petyo
Telerik team
answered on 11 Mar 2015, 08:12 AM
Hello Dean,

Thank you for sharing this. The link from your previous reply does not work, so I am not sure to which part of the API you refer to. Can you please share the correct URL? We will update our documentation accordingly. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Dean
Top achievements
Rank 1
answered on 11 Mar 2015, 10:06 PM
0
Petyo
Telerik team
answered on 13 Mar 2015, 02:26 PM
Hello Dean,

thanks. The syntax I linked to is not specific to the filterable (or, for that matter, to Kendo UI). The JSON data in attributes comes from jQuery itself. We will consider making the common widget cases (like this one) easier to find, though. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Nathan
Top achievements
Rank 1
answered on 04 Apr 2015, 07:15 AM
I spent a great deal of time trying to figure this out, and I am very thankful for Dean's post.  I wish this had been in MVVM filter demos.
0
ITLNOW
Top achievements
Rank 2
answered on 24 Aug 2016, 06:28 AM
Great @Dean That worked for me.
0
Mohammadali
Top achievements
Rank 1
answered on 19 Oct 2020, 03:14 PM

thank you soo much Dean you are a life saver ....

in kendoMobileListView api in the big important frame states  If initialized from Markup, the MobileListView does not support filtering!!

https://docs.telerik.com/kendo-ui/api/javascript/mobile/ui/listview/configuration/filterable

Tags
MVVM
Asked by
Dean
Top achievements
Rank 1
Answers by
Dean
Top achievements
Rank 1
Petyo
Telerik team
Nathan
Top achievements
Rank 1
ITLNOW
Top achievements
Rank 2
Mohammadali
Top achievements
Rank 1
Share this question
or