Hi Sivasakthi Nithyanantham,
Thanks for your patience and understanding.
We have confirmed that the reported behavior is an issue from our side and have logged it as "Not null, Null, Empty, Not empty are not working with - Filter template ". Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects(subject to technical feasibility and Product Development Life Cycle ) and will include the defect fix in our upcoming patch release which will be rolled out on "August 07 , 2024".
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through the below link,
Disclaimer: "Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization".
Regards,
Vikram S
Hi Sivasakthi Nithyanantham,
We are glad to announce that, we have included the fix for the issue “Not null, Null, Empty, Not empty are not working with - Filter template” in our 26.2.8 release. So please upgrade to our latest version of the Syncfusion package to resolve the reported issue.
Root Cause: The root cause of the issue occurs when we provide the filter template; at that time, ej2_instances are not present, causing the issue.
Solution: Fixed the issue by adding a condition to check whether ej2_instances is present or not, including checks for null, not null, empty, and non-empty values.
Sample: Wz88kh (forked) - StackBlitz
We thank you for your support and appreciate your patience in waiting for this release. Please get back to us if you need any further assistance.
Regards,
Aishwarya R
It throws run time error when click on filter icon here is the error
Hi Sivasakthi Nithyanantham,
We apologize for the inconvenience caused. You are still encountering a script error after filtering a record and reopening the filter dialog. We have confirmed that the reported case is an issue from our side and logged it as “A script error occurs when using the filter template, after applying the filter and reopening the filter dialog”. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technical feasibility and Product Development Life Cycle ) and will include the defect fix in our upcoming patch release which will be rolled out on “August 20th, 2024”.
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through the below link,
Disclaimer: "Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization".
Regards
Aishwarya R
Hi Sivasakthi Nithyanantham,
We are glad to announce that, we have included the fix for the issue “A script error occurs when using the filter template, after applying the filter and reopening the filter dialog” in our 26.2.10 release. So please upgrade to our latest version of the Syncfusion package to resolve the reported issue.
Root Cause: The issue arises because the ‘ej2_instances’ is missing when the filter template is provided.
Solution: The issue was resolved by incorporating a condition to verify the presence of 'ej2_instances'. This condition includes checks for null, not null, empty, and non-empty values.
We thank you for your support and appreciate your patience in waiting for this release. Please get back to us if you need any further assistance.
Regards,
Aishwarya R
It works. Thanks for your update
Hi Sivasakthi Nithyanantham,
You're welcome! Please feel free to contact us if you need any other assistance.
Regards,
Johnson Soundararajan S
Noticed below issues
Hi Sivasakthi Nithyanantham,
#Q1. When I select empty/not empty from its not clear already given input in text/field used for filter.
#Q2. When i use as <ejs-datepicker> filter template, it’s not disabling field when select empty/nonempty from filter dropdown list.
#Q3. Is there any event to listen filter option change event. I mean is it possible to listen the change of menu type filter operator dropdownlist.
We have validated your query and understand that you need assistance with menu-type filter template customization when switching the menu-type filter operator of the grid to empty/non-empty. By default, the grid’s menu-type filter value input maintains the grid’s filter or user-changed value. The grid will not change the user input unless specifically instructed. Therefore, only when selecting 'empty', 'not empty', 'null', and 'not null', the grid will disable the value component with the filtered or user-selected value.
However, if you want to customize this behavior to clear the value programmatically, you can override the operator dropdown list change event to listen and handle your filter template customization (such as disabling and clearing the value from the filter template component) to achieve your requirement.
We have prepared a customization sample for your reference. In that sample, we override the menu-type filter operator dropdown list change event to handle customization according to your filter template customization requirement. Please refer to the code example and working sample below for more details.
[code example]
|
<ejs-grid . . . . . . #grid [allowFiltering]="true" [filterSettings]="filterOptions" (actionComplete)="actionComplete($event)" > <e-columns> . . . . . . . <e-column field='OrderDate' headerText='Order Date' format='yMd' width=100> <ng-template #filterTemplate let-data> <ejs-datepicker value="{{ data?.value }}" format="MM/dd/yyyy" placeholder="MM/DD/YYYY"> </ejs-datepicker> </ng-template> </e-column> . . . . . . . </e-columns> </ejs-grid> actionComplete(args: FilterMenuRendererArgs) { if (args.requestType === 'filterAfterOpen' && args.filterModel['flMuiObj']) { args.filterModel['flMuiObj'].dropOptr.change = function( args: ChangeEventArgs ) { // here you can listen menu type filter operator dropdownlist value change. const valInput: HTMLInputElement = args.element.closest('.e-flmenu-maindiv').querySelector('.e-flmenu-valuediv .e-control'); if ( args.value === 'isempty' || args.value === 'isnotempty' || args.value === 'isnotnull' || args.value === 'isnull' ) { if (!isNullOrUndefined(valInput['ej2_instances'])) { valInput['ej2_instances'][0]['enabled'] = false; // disable filter menu template datepicker input here. valInput['ej2_instances'][0].value = null; // reset template datepicker value here at the time of select empty/not empty. } else { valInput.setAttribute('disabled', 'true'); } } else if (!isNullOrUndefined(valInput.getAttribute('disabled')) || (valInput.querySelector('input') && !isNullOrUndefined(valInput.querySelector('input').getAttribute('disabled')))) { if (!isNullOrUndefined(valInput['ej2_instances'])) { valInput['ej2_instances'][0]['enabled'] = true; // enable filter menu template datepicker input here } else { valInput.removeAttribute('disabled'); } } }; } |
Sample: 189325-filter-menu-template-empty - StackBlitz
Regards,
Vasanthakumar K
Hi Syncfusion ,
Thanks for the support.
Facing one more issue in updated version I have tried in versions 26.2.10 to 26.2.12
I have added below properties to grid
Frozen column works but when try to scroll horizontally, header is not scrolling correctly. It fixed and not scrolling along with values
Please help me to fix this
Note: I have tried isFrozen="true" and freeze="Left" too.
Hi Sivasakthi Nithyanantham,
Based on the provided information, we have observed that you are experiencing difficulties with enabling frozen columns in the Syncfusion Grid where the header does not scroll properly with the content while scrolling horizontally. We have developed a sample using the provided details, but we were unable to reproduce the reported issue. Please refer to the sample and video demonstration below, which illustrate proper synchronization between the header and content during horizontal scrolling.
Sample: 43kzte (forked) - StackBlitz
If the issue persists, kindly provide the following details to facilitate further validation:
1. The complete Grid rendering code, including the event handler functions associated with the events used in your Grid.
2. The type of data binding utilized in the Grid (Remote or Local). If remote data binding is used, please share the adaptor details.
3. A simple sample that replicates the issue or an attempt to replicate the issue using the provided sample.
4. A video demonstration showing the issue replication.
Regards
Aishwarya R
HI Syncfusion team,
In you above sample code, I have just added hide columns in databound as below
and in html just added below change
Now the scroll is not working as expected
Thanks
Sivasakthi N
Hi Sivasakthi,
We have reviewed your query about grid not properly scrolling horizontally when hideColumns method is used along with frozenColumns. We have validated this from our end, we suggest you to use the hideColumns method in the created event of the grid, or use the hideColumn in the dataBound event of the grid with a flag variable.
The code snippet has been attached for your reference. Please implement any one of the following.
1. using databound with flag variable:
|
dataBound() { if (this.isInitial) { this.grid.hideColumns('Order Date'); this.isInitial = false; } }
|
2. using created event:
|
created() { this.grid.hideColumns('Order Date'); }
|
Sample: https://stackblitz.com/edit/angular-pddfns-nsgen7?file=src%2Fapp.component.html
Please get back to us if you need any further assistance.
Regards,
Dineshnarasimman M
Hi
Above fix not works for me.
Thanks
Sivasakthi
Hi Sivasakthi Nithyanantham,
Based on the details provided, we have created a sample where the data is fetched through an API call, and the columns to be hidden are also retrieved from the API. However, we were unable to replicate the reported issue on our side. Please review the sample provided below for your reference:
Sample: https://stackblitz.com/edit/angular-grid-u7mdtf-stzcc6
We suspect the issue you're encountering might be due to a customization problem when invoking the hideColumns method. To investigate further and provide a more accurate solution, kindly share the following details:
Once we receive these details, we will be able to assist you more effectively in resolving the issue.
Regards,
Santhosh I