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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Excel filter

Thread ID:

Created:

Updated:

Platform:

Replies:

144633 May 15,2019 01:08 PM UTC Aug 1,2019 12:08 PM UTC Angular - EJ 2 7
loading
Tags: Grid
Sahal
Asked On May 15, 2019 01:08 PM UTC

Hi 

Is there a way to set the filter of the grid to search the columns with contains operator by default rather than by starts with



Thavasianand Sankaranarayanan [Syncfusion]
Replied On May 16, 2019 12:34 PM UTC

Hi Sahal, 

Greetings from Syncfusion support. 

Query: Is there a way to set the filter of the grid to search the columns with contains operator by default rather than by starts with 
 
We suggest you to use the below way to achieve your requirement. In the below sample, we have bind actionBegin event and override the default operator as contains for checkbox search in Grid. 

Please refer the below code example and sample for more information. 

    <ejs-grid #grid [dataSource]='data' allowPaging='true' allowFiltering='true' [pageSettings]='pageSettings' [filterSettings]='filterSettings' (actionBegin)='actionBegin($event)' > 
        <e-columns> 
            <e-column field='OrderID' headerText='Order ID' width='120' textAlign='Right'></e-column> 
        </e-columns> 
    </ejs-grid> 


actionBegin(args) { 
  if (args.requestType == "filtersearchbegin") { 
    args.operator = 'contains'; 
  } 
} 




Regards, 
Thavasianand S.

Sahal
Replied On May 18, 2019 09:20 AM UTC

Thank you Thavasianand,

Works like charm

Hariharan J V [Syncfusion]
Replied On May 20, 2019 06:33 AM UTC

Hi Sahal,

Thanks for your update.

We are happy to hear that your requirement has been achieved.

Regards,
Hariharan


Sahal
Replied On July 30, 2019 05:54 AM UTC

Hi Team,

I noticed that when excel filter is set on a grid gobally, no filtering is available on computed column defined by [valueAccessor] property. Please let me know how to achieve the filter on such column.


Another query I have is for the combobox. 
How do we set the initial value using angular 2 way binding. I have [(ngModel)] set to combobox , And if the value is specified before the combobox is created, the combo is rendered with blank text, although the value property is giving the set value

Hariharan J V [Syncfusion]
Replied On July 31, 2019 12:43 PM UTC

Hi Sahal, 

Thanks for your update. 

Query: when excel filter is set on a grid gobally, no filtering is available on computed column defined by [valueAccessor] property 
 
We have validated the provided information and checked with our end and its working fine at our sample. Could you please share more or below details that will helpful for us validate further at our end.  


  • Did you used allowFiltering false for that column?
  • Did you mean you are not getting any data(it’s not shown any data or not shown valueAccessor value) in excel filter?
  • if possible reproduce the reported problem at our sample and share the scenario to replicate it.
  • Share the code example and package version details

Regards, 
Hariharan 


Sahal
Replied On July 31, 2019 12:54 PM UTC

It happens when the feild is not available on the datasource. Its something that is completely created based on some expression

And I would like to filter on the expression result.
In the sample provided the filter is happening on the base data rather than the computed data.

Sample to reproduce  the error. (added column called new )

https://angular-gridedit-sample-vkkxhc.stackblitz.io

Also should I post another thread to get the answer for my second query 

Another query I have is for the combobox. 
How do we set the initial value using angular 2 way binding. I have [(ngModel)] set to combobox , And if the value is specified before the combobox is created, the combo is rendered with blank text, although the value property is giving the set value

Dhivya Rajendran [Syncfusion]
Replied On August 1, 2019 12:08 PM UTC

Hi Sahal, 

Thanks for your update. 

Query: It happens when the feild is not available on the datasource 
 
It’s necessary to define the field property for columns in Grid to perform actions such as filter, sort, group etc., Please refer the below help documentation for more information. 


Query: How do we set the initial value using angular 2 way binding. I have [(ngModel)] set to combobox , And if the value is specified before the combobox is created, the combo is rendered with blank text, although the value property is giving the set value 

We have prepared the sample with [(ngModel)] for ComboBox component. Please find the sample from below link,  


Regards, 
R.Dhivya    


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon