Copy Cell, paste in selected cell

Hello,

I've been using the SfDataGrid control to perform editing. I'm having an issue where when user does a CTL+C it copies the data but after selecting another cell to paste the data in and doing a CTL+V the data gets pasted into the first column instead of the selected cell.

Is there a way around this so the data can get copied into the correct selected cell?

Thank you

7 Replies 1 reply marked as answer

MA Mohanram Anbukkarasu Syncfusion Team March 4, 2021 09:52 AM UTC

Hi Larry Koutsavlis, 

Thanks for contacting Syncfusion support.  

We have checked the reported scenario. We are able to reproduce the issue only when the first cell of the copied row is empty. We have prepared a sample to replicate this scenario and it is available in the following link.  



Please check the above given sample and the video to replicate the issue and confirm whether you are facing the issue in same scenario. Kindly revert to us with more details about the issue if we have misunderstood the reported issue. We will update with further details based on your confirmation.  

Regards, 
Mohanram A. 



LK Larry Koutsavlis March 4, 2021 12:00 PM UTC

Not quite even with data populated in the first column of the second row I am still not able to paste the clipboard data into the selected cell. Video attached


Attachment: SfDataGrid_Demo_20210304_065831_3f6264d0.zip


MA Mohanram Anbukkarasu Syncfusion Team March 5, 2021 12:10 PM UTC

Hi Larry Koutsavlis, 
 
Thanks for the update.  
 
We have checked the provided video and found that you are copying, you have entered edit mode and select the cell content and copy the content. In such case, textbox will be loaded as the edit element and the copying is performed from the textbox only. But while pasting the content, you have not entered into edit mode and try to paste the content just by selecting the row.  
 
For copy and pasting rows in SfDataGrid, you should not trigger editing for the cell. You have to select the record by single click and perform the copy/paste operations. While copying/pasting in such manner, the entire row value will be copied/pasted (Not only the current cell value).  
 
If your requirement is to copy and paste only the selected cell value, then you have to set SelectionUnit as Cell. 
 
 
Please refer the below given help documentation link to know more about the clipboard operations support in SfDataGrid.  
 
 
Please let us know if you require further assistance from us.  
 
Regard, 
Mohanram A. 


Marked as answer

LK Larry Koutsavlis March 8, 2021 06:12 PM UTC

Thank you that worked out well


MA Mohanram Anbukkarasu Syncfusion Team March 9, 2021 05:16 AM UTC

Hi Larry Koutsavlis, 

Thanks for the update.  

We are glad to know that the provided solution worked at your end. Please let us know if you have any further queries on this. We are happy to help you. 

Regards, 
Mohanram A. 



BR bracknelson March 10, 2021 07:05 AM UTC

You can copy and paste specific cell contents or properties (such as formulas, formats, comments, and validation). By default, if you use the Copy and Paste icons (or  + C and  + V), all attributes are copied. To select a specific paste option, you can either use a Paste menu option or select Paste Special and pick an option from the Paste Unique box. Attributes other than what you select are eliminated when you paste.


MA Mohanram Anbukkarasu Syncfusion Team March 11, 2021 10:30 AM UTC

Hi bracknelson, 

Thanks for the update.  

Regards, 
Mohanram A. 


Loader.
Up arrow icon