Drop Down Filter Not equals

0
Hello, I am using datagrid2 with column filter i.e. drop down filter with enumeration. I would like to use "Not equal " enumeration in the filter. How to implement this? Is it available in any latest mendix version?
asked
2 answers
3

Hi Raghavendra, Great question.

Unfortunately, as of Mendix 10.8 (and even Mendix 10.10+ at the time of writing), the DataGrid2 widget does not natively support "Not equal to" filtering for Enumeration filters via the built-in column filters.

 

Current Limitation

In the default Enumeration filter (dropdown) in DataGrid2:

  • Supported: equals, empty, not empty

  • Not supported: **not equal to** (≠)

This is a known limitation and has not been added yet in the latest Mendix releases.

 

Workaround Options

Option 1: Use a Custom Filter (Dropdown + XPath/Expression)

You can build your own "Not equal to" filter logic like this:

  1. Add a dropdown widget (not the built-in column filter) above the DataGrid2.

  2. Bind the dropdown to a helper entity with a selected enum value.

  3. Use a data source (XPath or Microflow) on the grid to filter based on that selection.

Option 2: Use a Data View + Microflow Source for Grid

  1. Create a non-persistent helper entity with:

    • An enum value to exclude

  2. Use a Data View to wrap your grid, with the helper entity as the context.

  3. Use a Microflow as the data source of the grid that:

    • Accepts the helper as parameter

    • Returns only objects where Status ≠ HelperEnum

This gives you full control, though performance may suffer on large datasets (since it loads all records server-side).

 

I hope this one helps you! :)

answered
0

Hi Raghavendra,

You have to make your own custom filters.

Check out this article

https://medium.com/@mohammad.saqib_1262/part-1-unlocking-the-power-of-custom-filters-for-data-management-cd4f62b2e209

answered