Hi all, I create a IEditCell
And then create a NumericTextBox with a change event listener on the write method
Testing that this is the result:
After editing and clicking away the cell the change method is triggered, but this is not happening with the tab key,
do you have an idea because this is happening?
Plase check this stackblitz for more details:
https://stackblitz.com/edit/angular-zknjcu-jkxdvo
Tank you
Hi Christian,
Thanks for contacting Syncfusion support.
By using column.edit.params property, you can bind a change event
to the built-it editType component. In which, the change event
will be triggered properly on Tab key press. We suggest you to use below code
to achieve your requirement.
editParams: https://ej2.syncfusion.com/angular/documentation/grid/editing/edit-types/#customize-editors-using-params
getRowInfo: https://ej2.syncfusion.com/angular/documentation/api/grid/#getrowinfo
|
[app.component.ts]
params: { change: function (args) { console.log('Change Method 1'); var rowInfo = this.grid.getRowInfo(args.event.target.closest('td')); var totalCostValue = args.value * rowInfo.rowData['UnitsInStock']; this.grid.updateCell(rowInfo.rowIndex, 'TotalCost', totalCostValue); }.bind(this), }, }; this.stockParams = { params: { change: function (args) { console.log('Change Method 1'); var rowInfo = this.grid.getRowInfo(args.event.target.closest('td')); var totalCostValue = args.value * rowInfo.rowData['UnitPrice']; this.grid.updateCell(rowInfo.rowIndex, 'TotalCost', totalCostValue); }.bind(this), }, }; }
|
Sample: https://stackblitz.com/edit/angular-zknjcu-txf1lx?file=app.component.ts,app.component.html
Please get back to us if you need further assistance.
Regards,
Rajapandiyan S
Hi Rajapandiyan,
the suggested fix seems to work only if editType is numericedit, but not if it is a stringedit. With stringedit the change callback will not be triggered by the tab key, but only by clicking away the cell.
Any idea on how to fix it?
Thank you in advance,
Lev
Hi Lev,
Thanks for contacting Syncfusion support.
Query: With stringedit the change callback will not be triggered by the tab key, but only by clicking away the call.
We have confirmed that the reported behavior is an issue from our side and logged it as - “change event of textbox is not triggered when pressing tab key on batch edit”. 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 it will be fixed in any of our upcoming releases.
We will get back to you once the fix is rolled out. 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,
Rajapandiyan S