Hi Iana Stapelberg,
Greetings from Syncfusion Support.
We have reviewed your query and understood that you expect
to filter the grid column with custom operator. We also noticed that you have
set the grid column type as 'object'. We would like to tell you that the Grid
doesn't support the column.type as object. We have attached the types which the
grid support for the grid columns for your reference.
Column Type: https://ej2.syncfusion.com/angular/documentation/grid/columns/columns#column-types
To filter the grid with custom filter operator, we suggest
you to use grid.filterSettings.column and provide proper filter predicates. We
have attached the code information implementing the custom operator for
'between'.
|
filter() {
var predicates = [
{
field: 'Freight',
operator: 'greaterthan',
condition: 'or',
value: 10,
},
{
field: 'Freight',
operator: 'lessthan',
condition: 'and',
value: 20,
},
];
this.grid.filterSettings.columns = predicates.map((predicate) => {
return {
field: predicate.field,
operator: predicate.operator,
value: predicate.value,
predicate: predicate.condition,
};
});
}
|
Sample: https://stackblitz.com/edit/angular-imtnt6?file=src%2Fapp.component.ts
If this doesn't meet your requirement, please elaborate your
requirement so that we can understand better and provide appropriate solution.
Regards,
Dineshnarasimman M