We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

About TreeGrid Filter Operators


Is it possible to change the default filter bar operator?
I tried referring to the following URL, but TreeGrid seems to be different.

(Source code I tried)
function dataBound(args) {
    var grid = document.getElementById("TreeGrid").ej2_instances[0];
    Object.assign(grid.filterModule.filterOperators, { startsWith: 'contains' });


3 Replies

FS Farveen Sulthana Thameeztheen Basha Syncfusion Team April 5, 2019 11:47 AM UTC

Hi Pylori, 

Thanks for contacting Syncfusion Support. 

QUERY : Unable to change TreeGrid default Filter Operator 
From your query we understand that, you are unable to change the default filter bar operator of treegrid. TreeGrid is built over the Grid Component. We can get the Grid instance from TreeGrid. So we can achieve your requirement by accessing Grid property from TreeGrid like below code example:- 

function dataBound(args) { 
    var treegrid = document.getElementById("TreeGrid").ej2_instances[0]; 
    Object.assign(treegrid.grid.filterModule.filterOperators, { startsWith: 'contains' }); 

Please get back to us if you need any further assistance. 

Farveen sulthana T 

PY Pylori April 5, 2019 01:11 PM UTC


I always appreciate your prompt response.
I was able to achieve the requirements.


VN Vignesh Natarajan Syncfusion Team April 8, 2019 04:50 AM UTC

Hi Pylori,  

Thanks for the update.  

We are glad to know that your query has been resolved by our solution.  

Please get back to us if you have further queries. 

Vignesh Natarajan 

Live Chat Icon For mobile
Up arrow icon