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

Multi-checkbox filter menu doesn't work with null values

2 Answers 667 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Inga
Top achievements
Rank 1
Inga asked on 25 Nov 2019, 09:06 PM

I use filterable multi-checkbox menu component as it's guided here https://www.telerik.com/kendo-angular-ui/components/grid/filtering/reusable-filter/#toc-multi-checkbox-menu-filtering but it does not work for empty values. If I select an empty value in filter menu, the Filtering button is not enabled, even if I select more values, the result will still not include empty values.

 

2 Answers, 1 is accepted

Sort by
0
Inga
Top achievements
Rank 1
answered on 25 Nov 2019, 09:24 PM

I see that the same issue was fixed for the jquery version.

https://www.telerik.com/forums/multi-filter-with-null-values---they-are-not-visible

Is it possible also to apply changes for the Angular?

0
Dimiter Topalov
Telerik team
answered on 26 Nov 2019, 12:25 PM

Hi Inga,

The multi check box filter is just a sample custom implementation that demonstrates how to utilize FilterMenu templates and to provide a custom UI for filtering the respective column values. It is not an actual Kendo UI for Angular component that is officially supported, but rather a sample component used for the purposes of the demo and to point developers in the right direction for creating their own custom reusable filter components that will best suite their needs.

It can be extended further by some additional custom logic, or replaced with other UI (or the built-in one that contains a filter operator dropdown with the IsNull/Empty options):

https://www.telerik.com/kendo-angular-ui/components/grid/filtering/#toc-filter-menu

The sample multicheckbox filter operates under the presumption that the operator will always be "equals" and the logic - "or" so that all selected values should pass the filter and remain after the data is processed. If there are null or empty values, you can provide a chekbox and appropriate text for them too so that the user can select it, and modify the logic for creating the respective filter descriptor via changing the operator dynamically based on the value, for example:

https://stackblitz.com/edit/angular-pnazmw-chtlpu?file=app/multicheck-filter.component.ts (the first data item has an empty string value for ProductName and a null value for UnitPrice).

I hope this helps.

Regards,
Dimiter Topalov
Progress Telerik

Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Grid
Asked by
Inga
Top achievements
Rank 1
Answers by
Inga
Top achievements
Rank 1
Dimiter Topalov
Telerik team
Share this question
or