Hagai Cohen
Hagai Cohen

Reputation: 121

Kendo UI Grid - custom filter

I would like to have custom filter on one of the grid columns, in the following way:

  1. If the operator is 'is equal to' the user will be able to select a value from a drop-down-list.

  2. 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

Answers (1)

moomoo
moomoo

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

Related Questions