Double call to CurrentCellEndEdit

I have an issue with the CurrentCellEndEdit event being called twice.

In the initial event, I will programmatically add another row to the data grid. However doing this will cause the event to fire again.

I am replicating the auto new row that some grids have.

So in the first row, the first cell will have a *. I edit that cell to add a value, say '1'. I click out of the cell and it triggers the  CurrentCellEndEdit event.

In that event I will manually add a new row to the grid with the first cell as a *.

However, adding another row/item like this to the data model, will for some reason fire the event again and this causes the '1' I entered to be erased. The data model will now have a null value where there should be a '1'.

I can go back and re-add the '1' to that cell again and it will stay, but I need it to stay the first time.


1 Reply

NY Nirmalkumar Yuvaraj Syncfusion Team April 12, 2024 07:08 AM UTC

Hi Phunction

  

Based on the information provided, we conducted tests using a simple sample to replicate the reported issues. However, we were unable to reproduce the issues as described. In our sample, when we edit the cell, the event is triggered; however, when we add a new row to the datagrid, the event is not fired. We tested this scenario using the attached sample, and it worked correctly without any issues. If you are still encountering the same problem, we kindly request you to modify the attached sample to reproduce the issue and provide additional details. This will greatly assist us in investigating the issue further and providing an appropriate solution as quickly as possible.


Regards,

Nirmalkumar


Attachment: SfDataGridSample_cec9e4b5.zip

Loader.
Up arrow icon