Reputation: 121
I would like to have custom filter on one of the grid columns, in the following way:
If the operator is 'is equal to' the user will be able to select a value from a drop-down-list.
For the other operators (contains, start with etc.) the user will be able to enter a free text.
can anyone explain me how to implement that?
Thanks
Hagai
Upvotes: 2
Views: 10563
Reputation: 906
There are several Grid features you should look into. The first is "columns.filterable.ui". This allows you to display a custom editor in the filter popups. Kendo-UI already shows different editors for string, number and date fields. The second feature is the "filterMenuInit" event. In it's handler you can look for the operator DropDownList and bind it's "change" event where you can modify your custom editor based on the selected value.
Upvotes: 2