Reset kendo Multi filter checkbox dataSource to reflect filtered data

I am trying to filter a datasource by multiple fields. I have a Kendo Multi filter checkbox on my grid. I am initializing every Kendo multi-filter for every column.

After that, I apply the filter using a javascipt function like this and set the grid data as the filtered data.

function filterGrid() {
    var grid = $("#grid").data('kendoGrid');
    var filter = [];
    filter.push({ field: "ratingPlace", operator: "startswith", value: "US" });


Thus, the function applies the filter to the mesh. now when I click the Kendo multi filter option, all data from the old data source appears in the filter list.

How can I avoid this? I need only the filtered data to be available only in the filtered list and not in all items of the data source. I don't have this problem when I initialize a multi Kendo checkbox filter after executing the filterGrid () function. Is there a way to reinitialize the source ("kendoFilterMultiCheck") of each column ?? I've attached a jsfiddle example to demonstrate the same.

1) first initialize all multi filter checkboxes by clicking the column header with the original data source 2) click the filter button 3) the data source is replaced 4) click the multi validation button with the new data source - the old filter data will appear in the list


source to share

1 answer

I suggest defining a custom data source for a checkbox with multiple filters and just call its read method to reload the data.



Reload multiple selection filter block when grid data changes



All Articles