As it stands, the menu filter dropdown Null checkbox doesn't return any of the grids Null values. Is there a way to correct the filters operator or to even remove the checkbox option to filter by Null?
I've had a look through the forum and couldn't find an official response to deal with this issue, there was this thread but I've not stumbled across these filter options before and I'm not interested in updating base code as we reference the most recent kendo from your repos. https://www.telerik.com/forums/multi-filter-with-null-values---they-are-not-visible
Thanks in advance.
6 Answers, 1 is accepted
The Kendo UI Grid MultiFilterCheck works with null values since 2018.R1, here is the closed issue that completed this request, also referenced in the thread that you provided:
For the functionality to work correctly, ensure that the data source schema fields types are defined:
If you do not wish to show the option to filter by null, you can take advantage of the itemTemplate function:
Runnable example: https://dojo.telerik.com/@bubblemaster/UnIBIfuk
Let us know in case of further questions.
The Dojo could does exactly what I need but I'm having some issues applying it to my code. The item template seems to be applying correctly and removes the Null option from the dropdown filter. However once I select a value to filter with, it seems to try to apply all the filter options and displays an "On" value in my filter row text box. [see images below]
I've stripped my code right back and tested it with all my additional functions removed and fields removed and it still exhibits the same behaviour.
I've attach my code as well.
Thank you very much for the provided snippet.
I was able to use it to reproduce the issue. It came from the template, the checkboxes bind to the filter value, and in this case the value was missing, if you change the template as below, it should work as expected:
Here is a runnable example using the provided grid configuration:
Have a look and let me know how you get on with it and if you notice anything incorrect, please let me know the steps to take to reproduce it.
The example you've provided doesn't work i'm afraid. If you try to filter any of the columns using Null, it returns no results.
To get round the issue we ended up just replacing all null values with an empty string at the stored procedure level for all our calls.
Thanks for you help though :)
Apologies, I was focusing only on the UNIT field.
To have the example fully working, all the properties types need to described in the schema model definition. I assume that you have tested with the INDUSTRY and PLANT fields as they are the ones which have null values in the data sample. So you can see that after defining their types, everything works as expected: