Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
WDG - change behaviour of filter isnull

I am using 21.2

When i filter rows and select Is Null, it doesnt return any rows.  I think it is due

to the underlying bounddatafield is blank, not null.

I would like to give users ability to filter rows with blank values, so I can either

add a new filter type or change behaviour of existing is null filter.

Im not sure how to do this ?

I did find javascript to hide the values, but not to modify or add new ones

thanks in advance

  • 1360
    Offline posted

    Hello Peter,

    There is no way to override the Filtering behavior of the predefined options. Additionally, when you use the “Equals” filter rule option with an empty string value, it acts like the "Clear Filter" rule, which is by design. 

    The only way to make the “isNull” filter rule to show the empty values in the field would be to handle the DataFiltering event on the server and filter the data source on your own and rebind it back to the grid. You would also need to consider a few other cases such as being able to filter the original data of the grid, while using the other filter rules such as “Equals”, “Contains” etc. to do this you would have to check if the filter rule is different from is null and rebind the original data.

    To be able to use the “Clear Filter” when using the “isNull” filter rule, another filter rule should be assigned so that the column contains a filter condition that could be cleared by using “Clear Filter”, if the column doesn’t contain null values, then “isNotNull” might be the appropriate filter rule.

    Please note that all those scenarios need to be handled on application level and depending on the needs of your application some other cases would need to be considered as well.

    I am attaching a small sample that demonstrates what I have explained above, please test it and let me know if you have any questions or concerns.

    Ivan Kitanov

Reply Children
No Data