2
votes

On the datasource of kendo grid I specified, in model, the type for each field.

In kendo grid for string, number and date I specified all the operators for each type.

However I can see only 'eq' and 'neq' operators (also for string, number and date fields).

Here is how i defined filterable.operators in my kendo grid:

    filterable: {       

            operators: {
                //filter menu for "string" type columns
                string: {
                    eq: "Uguale a",
                    neq: "Diverso da",
                    startswith: "Comincia con",
                    contains: "Contiene",
                    endswith: "Termina per"
                },
                //filter menu for "number" type columns
                number: {
                    eq: "Uguale a",
                    neq: "Diverso da",
                    gte: "Maggiore o uguale a",
                    gt: "Maggiore di",
                    lte: "Minore o uguale a",
                    lt: "Minore di"
                },
                //filter menu for "date" type columns
                date: {
                    eq: "Uguale a",
                    neq: "Diverso da",
                    gte: "Successiva o uguale al",
                    gt: "Successiva al",
                    lte: "Precedente o uguale al",
                    lt: "Precedente al"
                }
            }                    
        }    

==========================================

enter image description here

1
This part of the code seems legit to me. Can you post the full grid initialization parameter? - The_Black_Smurf
The image doesn't help much... it ain't related to kendo grid initialization. It's only showing the model. - The_Black_Smurf
You're right, I'll update as soon as possible, thanks in advance. - assistbss
Don't answer by editing your question. Write your own answer and accept it to let other SO users you have found a solution to your question. - The_Black_Smurf

1 Answers

1
votes

The problem was in grid columns configuration.

For all columns I had a 'values' array.

It is useful for columns that must be filtered by static values (filter by sex, values: ['M', 'F']).

The problem arises when array values is empty.

Solved deleting values property when values array is empty.