4 Answers, 1 is accepted
My suggestion is to define custom DataSource for the multi filter check box and just call its read method in order to reload the data. For example please review the Grid / Filter Multi Checkboxes demo and specifically the second Kendo UI Grid instance.
In order to access the filter multi check box instance
This works well for re-reading the multicheck items. Too well. I have 3 multicheck filters and it causes all of them to be re-read from the datasource when I filter the grid even though the user never looks at that column's multicheck filter.
How can I clear the items/reset the filter on the column so that it only hits the transport read when it needs the data (like the first time the user displays the filter)? I've clearing the items array but that doesn't seem to work.
I just want to set the filter to the initial state so it will re-read when the user displays the multicheck filter.
(Long time user, first time poster. :-) )
At the time of my last response the filterMenuOpen event was not introduced in the Kendo UI Grid yet. The filterMenuOpen event can be very useful in order to achieve the desired behavior. The event arguments gives you access to the container element. The container element can be used in order to get a reference to the Kendo UI FilterMultiCheck instance and call the read method of the dataSource. Please refer to the code snippet from my response on 2nd of November 2015.
That's actually what I ended up doing the next day. When I filter the grid client side, I just set a flag and then on the filterMenuOpen if the flag is set I use the code you have above to reload the check list (and clear the flag). You do see the old list briefly before it's reloaded but at least all the new items are there.
I thought filterMenuInit would be the place but that only gets executed once, not every time the filter is displayed.
Thanks for the reply and hope this can help someone else with the same problem.