Change Default Operator

1 Answer 15 Views
Grid
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Stefan asked on 06 Nov 2025, 02:44 PM

We have a column of type text, and want to change the default filter from 'equals' to 'contains'.


This doesn't seem to have any effect: 

.Filterable(f => f.Cell(c => c.Operator("contains")))


This does not seem to work in the context of the MVC Grid: jQuery Set the Default Filter Operator in the Grid - Kendo UI for jQuery

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 07 Nov 2025, 09:38 AM

Hello Stefan,

 

Thank you for reaching out.

This will work when you have the following mode active:

 .Filterable(f=>f.Mode(GridFilterMode.Row))
Here is a live sample I have created for demonstration:
https://netcorerepl.telerik.com/mzvPELkN33xFlTg237

As an alternative, you can also try adding the .Clear() method:

columns.Bound(p => p.ColumnName)
    .Filterable(f => f.Operators(o => o
        .ForString(fs => fs.Clear() // Removes all other operators
            .Contains("Contains")   // Adds "Contains" as the default and only option
        )
    ));

Or, to keep more options with "Contains" as default:

columns.Bound(p => p.ColumnName)
    .Filterable(f => f.Operators(o => o
        .ForString(fs => fs.Clear()
            .Contains("Contains")
            .StartsWith("Starts with")
            .Eq("Equals")
        )
    ));

 

Let me know if you find this helpful or if you have further instructions.

 

Regards,
Eyup
Progress Telerik

Your perspective matters! Join other professionals in the State of Designer-Developer Collaboration 2025: Workflows, Trends and AI survey to share how AI and new workflows are impacting collaboration, and be among the first to see the key findings.
Start the 2025 Survey
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
commented on 11 Nov 2025, 10:04 AM

Hello Eyup,

thank you for the examples. Unfortunately we're not using the 'Row' filter mode.

When using the Clear() method, and subsequently adding the different filter options again, the options lose their automatic multi-language support. Do we have to provide the option labels for different languages ourselves then?

 

Kind regards.

Anton Mironov
Telerik team
commented on 14 Nov 2025, 08:49 AM

Hi Stefan,

In order to achieve the desired behavior, I would recommend using the approach from the following article:

Here is a dojo example:

By using the FilterMenuInit Event, you can change the default operator as shown in the examples above and also to remove the unneeded ones.

 

Kind Regards,
Anton Mironov

Tags
Grid
Asked by
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Eyup
Telerik team
Share this question
or