This is a migrated thread and some comments may be shown as answers.

Custom Value Fields Based on Operator

0 Answers 81 Views
Filter
This is a migrated thread and some comments may be shown as answers.
Joey
Top achievements
Rank 1
Joey asked on 26 Apr 2021, 05:44 PM
Hi,

Currently I have an editor template set for date fields where it changes out the input based on what operator is selected. We have custom operators such as "Next X Days" and "Last X Days" where I would like the input to be a number field, and then for operators such as "Is Equal To" I would like those to be date fields. I have this working, but the problem is that the value in the input doesn't show up in the expression preview or in the serialized data from the filter. Is it possible to accomplish what I'm trying to accomplish?
Tsvetomir
Telerik team
commented on 29 Apr 2021, 02:27 PM

Hi Joey, could you share the exact code snippets that are used to render the custom editors depending on the selected operator? Indeed, the editors rely on specific data-* attributes that follow the MVVM pattern. Hence, if the editors are not set up and bound via MVVM, the values will not be automatically reflected inside the preview expression as well as a value in the data source.

No answers yet. Maybe you can help?

Tags
Filter
Asked by
Joey
Top achievements
Rank 1
Share this question
or