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

search box in excel filter

is there some way I can change search operator in excel filter search box to 'contains' instead of 'startswith'?

Thank you, 
T


3 Replies

PS Pavithra Subramaniyam Syncfusion Team May 6, 2019 09:21 PM

 
Thanks for contacting Syncfusion support. 
 
You can change the Excel searchbox operator from ‘startswith’ to ‘contains’  by using the ‘actionBegin’ event of Grid component. Please refer to the below code example, documentation link and sample link for more information. 
 
[component.ts] 
@Component({ 
    selector: 'app-root', 
    template: '<ejs-grid #grid [dataSource]='data' (actionBegin)="actionBegin($event)" allowPaging='true' allowFiltering='true' [pageSettings]='pageSettings' [filterSettings]='filterSettings'> 
        <e-columns> 
            .  .  . 
        </e-columns> 
    </ejs-grid>', 
}) 
 
export class AppComponent { 
    .  .  . 
    ngOnInit(): void { 
        this.data = orderDataSource; 
        this.filterSettings = { type: 'Excel' }; 
    } 
    public actionBegin(e: any): void { 
       if(e.requestType == 'filtersearchbegin'){ 
              e.operator="contains"; 
        } 
    } 
} 
 
 
 
Please get back to us if you need any further assistance on this. 
 
Regards, 
Pavithra S. 



TT ttArbor May 7, 2019 06:11 AM

works great!

Thanks


PS Pavithra Subramaniyam Syncfusion Team May 7, 2019 10:40 PM

Hi thao,  

Thanks for your update. 

We are happy to hear that the provided solution works. 

Please contact us if you need any further assistance. As always, we will be happy to assist you.  

Regards,  
Pavithra S. 


Loader.
Live Chat Icon For mobile
Up arrow icon