Keep reference of changed cells on cut/paste and undo/redo

Dear Syncfusion Team,

1. Get reference of cut cells
When using the cut/paste feature, I need to keep track of the cells that were selected to be cut because after I paste them elsewhere I need to update the database to erase the content of the cells that have been cut. What I am experiencing now is that once I paste cells that have been cut, the originating cells get cleared in the spreadsheet (which is expected) but the actual data in the DB doesn't. So I need to clear the data manually but to do so I need to have a reference to the cells that have been selected to be cut in the first place. Is there a way I can get such a reference after pasting?

2. Get reference when undoing/redoing
When performing undo/redo actions, I need to keep by DB in sync with what is happening on the spreadsheet. Is there a way to keep track of the ranges that change along with their content on every undo/redo action?

Thank you,
Remy

4 Replies 1 reply marked as answer

SP Sangeetha Priya Murugan Syncfusion Team February 16, 2021 09:19 AM UTC

Hi Remy, 
 
Thank you for contacting Syncfusion support. 
 
Query #1:  Get reference of cut cells 
 
We have checked your reported requirement and it can be achievable in our spreadsheet by using the actionBegin and actionComplete event. In the actionBegin and actionComplete event we have provided the copied range and pasted range details in the arguments itself. By using this arguments you can manually update the database in your end. And you can find whether the copy action or cut action is done by using the copiedInfo isCut Boolean property. 
 
Query #2: Get reference when undoing/redoing 
 
We have checked your reported issue in our end and we considered this as an improvement. In this we will trigger this actions in dataSourceChanged event. And the fix will be available our Essential studio volume 1 SP1 2021 release. We appreciate your patience until then. You can track the status of this feature using below link from our feedback portal. We appreciate your patience until then.  
 
 
Regards, 
Sangeetha M 



RE Remy February 25, 2021 04:20 AM UTC

Hello Sangeetha,

Would you be able to provide a sample for the cut/paste? I cannot get it to work properly. Copy/Paste works wonderfully (all data reflected correctly in the DB) but Cut/Paste behaves very oddly... As soon as there's an empty row in the range I select to cut, the data gets messed-up in the DB.

Thank you,
Remy


SP Sangeetha Priya Murugan Syncfusion Team February 25, 2021 11:01 AM UTC

Hi Remy, 
 
Thank you for your update. 
 
We have checked your reported requirement and as we have stated before you can get the cut data range and pasted range in the actionComplete event. For your convenience, we have prepared the sample that displayed the cut and pasted range in the alert dialog. By using this range you need to clear the data in the cut range and updated data in the pasted range in your database. Meanwhile, we have also planned to trigger the dataSourceChanged event for cut- paste action in our Volume 1 SP1 promised fix in our previous update. Please find the sample link below. 
 
 
Could you please check the above link and get back to us, if you need any further assistance on this. 
 
Regards, 
Sangeetha M 



SP Sangeetha Priya Murugan Syncfusion Team May 18, 2021 12:48 PM UTC

Hi Remy, 
 
Thank you for your patience. 
We are glad to announce that our Essential Studio 2021 Volume 1 service pack release v19.1.0.63 is rolled out and is available for download under the following link. In this we have included the fix for this improvement (Get reference when undoing/redoing) in our EJ2 Spreadsheet. 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards, 
Sangeetha M 


Marked as answer
Loader.
Up arrow icon