What I want is to list all books in a ListView. Then, clicking a button related with a category, I want to filter them. All books are loaded in the client side (there are not many). Server is not called for filtering.
When I press a button, the following function is called:
function filterByCategory() {
var list = $("#reportlistview").data("kendoListView");
list.dataSource.filter({
field: "Category",
operator: "contains",
value: "xx"
});
}
I expected that the ListView only shows items with Category=xx, but the listview does not change. It continuous showing all books.
The ListView is created with:
@(Html.Kendo().ListView<Books>(Model)
.Name("reportlistview")
.TagName("div")
.ClientTemplateId("template")
.Selectable()
What am I doing wrong?
Thank you
When I press a button, the following function is called:
function filterByCategory() {
var list = $("#reportlistview").data("kendoListView");
list.dataSource.filter({
field: "Category",
operator: "contains",
value: "xx"
});
}
I expected that the ListView only shows items with Category=xx, but the listview does not change. It continuous showing all books.
The ListView is created with:
@(Html.Kendo().ListView<Books>(Model)
.Name("reportlistview")
.TagName("div")
.ClientTemplateId("template")
.Selectable()
What am I doing wrong?
Thank you