Unplanned
Last Updated: 27 Jul 2023 09:23 by ADMIN
Tatsuro
Created on: 17 Mar 2023 02:02
Category: Data Grid
Type: Feature Request
0
Request: isnullorempty filter for text field.

Hi,

I would like to have 'isnullorempty' filter for text field on Data Grid. There are 'isnull' and 'isempty' filters but it is not straightforward for non-engineer guys. If we have 'isnullorempty' filter, I think it is very useful. 

Other option, is there any way to customize filter operator by myself so that we can have any filter operation?  

 

Thank you,

Tatsuro Matsumoto.

3 comments
ADMIN
Konstantin Dikov
Posted on: 23 Mar 2023 13:48

Hi Tatsuro,

You are correct that this approach will fail with the columnMenu and I have to say that there is no workaround that we can suggest for it. The only option would be to define entirely custom filterUI with the drop down for the operators and a custom input for the filter value:

 

Regards,
Konstantin Dikov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tatsuro
Posted on: 23 Mar 2023 02:42

Hi Konstantin,

 

Thank you for your comment and suggestion of the workaround. I did try your suggested custom operators but it didn't work when I used 'ColumnMenu' for filtering.

 

Please refer to the following sample. 

https://stackblitz.com/edit/react-wryzhc-ya4tcu?file=app%2Fmain.jsx

You can find the custom operator 'Is Null Or Empty' on a text field (e.g. 'Product Name') but the filter button is disabled unless you enter any string in the text input field. Is there any workaround for this?

 

Thank you,

Tatsuro Matsumoto. 

ADMIN
Konstantin Dikov
Posted on: 20 Mar 2023 19:10

Hi Tatsuro,

Thank you for submitting this feature request.

We will monitor the interest in it and act accordingly based on its popularity.

Meanwhile you can define custom filter operators for the Grid through the filterOperators property:

Please note that in order for the Grid to be able use custom operators you will have to include the "text" for the new operators in the messages for the localization. I have created an example demonstrating how you can add "isnullorempty":

Nevertheless, I do agree that adding this as a built-in operator would be beneficial.

 

Regards,
Konstantin Dikov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.