hi,
I am using v14.2.
you can use the sample project and I also provide the excel.
you can copy all cells, and paste into the comment cell in xamDataGrid and I hope you will see what I described
excel
Hello lin,
Thank you for your post.
I have been investigating into this issue you are seeing, and I have reproduced it with the sample project you have provided. It appears that you are correct in that this issue only happens when some of the content of the copied content is encapsulated in quotation marks.
This is unexpected behavior, and as such I have asked our engineering staff to investigate further. I have created a support case for you on this matter, which has an ID of CAS-168966-P9R2F7. You can access this support case after logging into your account at https://ko.infragistics.com/my-account/support-activity. I have logged this issue in our internal tracking systems with a development ID of 212807. The next step will be for a developer to look into this a bit further and offer a fix or other resolution, at which time, you will be notified of the result.
As a workaround in the meantime, I would recommend hooking into the ClipboardPasting event on your XamDataGrid. The event arguments of this event will allow you to obtain the values that will be pasted on a cell-by-cell basis. When this issue is present, each of the values will be the same and each of the string representations of the values being pasted will contain a "\r\n" character. I would recommend that you use the event arguments of this event's handler and parse this value, splitting it on the "\r\n" newline string.
After doing this, I would recommend looping through each Cell object in your XamDataGrid's SelectedItems.Cells collection. These will be the cells being pasted to. You can get the index of these cells to be pasted to and then assign the corresponding index of the split "\r\n" string as its value to be pasted, assuming there are enough cells. If there aren't or there are more cells selected in your grid than there are Excel cells copied, you can simply set those cell's pasted values to the value that already exists in the cell.
I have attached a modified version of the sample project you had sent me to demonstrate the above. I will also be sending the initial update to the support case I have created for you shortly.
I hope this helps you. Please let me know if you have any other questions or concerns on this matter.
Sincerely,AndrewAssociate DeveloperInfragistics Inc.www.infragistics.com/support