This is a migrated thread and some comments may be shown as answers.
Hide value picker when grid filter is of type "isempty"
1 Answer 20 Views
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 27 Jul 2018, 08:10 AM

Hello,

1.) User open page with grid
2.) They select filter and choose one of this options: isnull, isnotnull, isempty, isnotempty.
3.) Field for value is still visible. It should be hidden because it is useless in this context.

Is it possible to hide it? Does the support plan to implement it in the future release?

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 30 Jul 2018, 01:13 PM
Hi Daniel,

Keeping the selected value in the DatePicker is made that way by design, because the user could decide to change the operator to something that will use the selected date. However, if you want to clear the value on some operators you could handle the "filter" event of the Grid and remove it manually:
filter: function(e){
  if(e.filter && e.filter.filters && e.filter.filters[0].value &&
    e.filter.filters[0].operator == "isnotnull" && e.filter.filters[0].value.getDate){
    e.filter.filters[0].value = null;
  }
},

You can add the conditions for the other operators as well.


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