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 7, 2019 05:21 AM UTC

 
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 02:11 PM UTC

works great!

Thanks


PS Pavithra Subramaniyam Syncfusion Team May 8, 2019 06:40 AM UTC

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