Clipboard events

Hi,

I'd like to use the grid clipboard functionality (https://ej2.syncfusion.com/vue/documentation/grid/clipboard/). I'm using local data and I'd to use axios to push the update to the server after the clipboard action is complete. Which method can I use to know when the paste event is complete so I can get the new cell value and push it to the server?

3 Replies 1 reply marked as answer

BS Balaji Sekar Syncfusion Team October 28, 2020 01:29 PM UTC

Hi Christian, 

Greetings from the Syncfusion support. 

Based on your query we suspect that you want to update the clipboard action to server while completed the paste action. To achieve your requirement using cellSelected event of the Grid component. 

In cellSelected event we can get the edited Grid’s row using getBatchChanges method and you can pass that records to server end. 

We suggest you to use Batch editing to achieve your requirement and clipboard feature has some limitation as given below. 



Please refer the below code example for more information. 

 cellSelected(args) { 
    if ( 
      args.selectedRowCellIndex.length > 1 && 
      (this.grid.editModule.getBatchChanges() as any).changedRecords.length 
    ) { 
      console.log( 
        (this.grid.editModule.getBatchChanges() as any).changedRecords 
      ); 
    } 
  } 

we have prepared the sample with this requirement and that can be download from the below link, 
 
 
Refer the below link to know about AutoFill feature and cellSelected event of the Grid, 
 
 
 
Please get back to us, if you need further assistance. 
 
Regards, 
Balaji Sekar 



CD Christian DAquino October 28, 2020 03:31 PM UTC

Hi Balaji,

Thanks for that. But can you please provide an example using VueJS instead of Angular?


BS Balaji Sekar Syncfusion Team October 29, 2020 12:41 AM UTC

Hi Christian, 

Sorry for inconvenience caused, 

We have created a sample with your requirement in Vue framework. Please refer the below code example and sample for more information. 

[App.Vue] 
cellSelected(args) { 
    if ( 
      args.selectedRowCellIndex.length > 1 && 
      (this.grid.editModule.getBatchChanges() as any).changedRecords.length 
    ) { 
      console.log( 
        (this.grid.editModule.getBatchChanges() as any).changedRecords 
      ); 
    } 
  } 


                                          https://ej2.syncfusion.com/vue/documentation/api/grid/#cellselected  

                                                         https://ej2.syncfusion.com/vue/documentation/grid/clipboard/?no-cache=1#limitations-of-paste-functionality  

Please get back to us, if you need further assistance. 

Regards, 
Balaji Sekar 


Marked as answer
Loader.
Up arrow icon