DataGrid FilterMode.Advanced IsNull and IsNotNull not working on text columns

IsNull and IsNotNull produce filters that do not work (in case of IsNull result is always false, while on IsNotNull it's always true). I've tracked this down to LoadDataArgs.Filter holding (Property == null ? "" : Property) == null in case of IsNull and (Property == null ? "" : Property) != null in case of IsNotNull filters (where Property is the name of the property being filtered). Is there any way to elegantly fix this behaviour, 'cause currently only idea that comes to my mind is regex before passing into Where statement.

Fixed and the fix will be part of our next update later this week.

Hi
I am not sure if this was implemented and released but I am seeing some odd behaviour with the Advanced Filter when filtering a column with mixed text strings and null values.
When I first open the Filter popup, select "Is not null" and then hit Apply, the column is not filtered and all values are still shown.
If I then re-open the Popup and type any chars in the box below "Is not null", hit Apply, re-open the Popup again and remove those random chars and hit Apply again then the Filtering starts working!
I tried to test on one of your demos but can't find an example when a column has mixed strings and null values.
I just don't know if it is something odd with my implementation?
Is this a known issue?
Regards

3 Likes

hi, we have the same problem on isnull or isnotnull as filter options on string type columns, described by
briancarter and his workaround works, have you planned a fix?

Hi
I see that release 3.18.1 was marked with the following as fixed

  • DataGrid string columns IsNull/IsNotNull filtering fixed.

I have tested and the problem as listed above still persists. The workaround is still required to get the IsNull/IsNotNull filtering to work.

Regards
Brian

Hey @briancarter,

Works as expected on our demos. For example Region column in this demo:


Thanks enchev
I finally got to the bottom of the issue. I was storing empty strings rather than null values in the cells...
As a side note I also found that the Reset() function was not clearing any IsNull/IsNotNull FilterOperator selection. I can fix this by adding the following statement in the Reset() function, but not sure if it is not there for a specific reason?

c.SetFilterOperator(FilterOperator.Equals);

Thanks again

Hi Radzen Team,
I am using the Radzen components version 3.18.8 and I am encountering the same issue. If the "is null" or "is not null" filter is applied to any columns in the Data Grid, the reset() method would not clear the filter.

Is there a way to fix or workaround this problem?

Thank you in advance.

-John

Hi Radzen Team,
It looks like in the latest components release 3.18.15, the Datagrid Reset() function is still not clearing any IsNull/IsNotNull FilterOperator selection as reported by braincarter on April 21.

Thank you.