Hi!
I need to allow copy/paste of a row in a wingrid. The problem is that I have 2 cells that are read-only. So when I paste the row, I received an error asking me to continue to copy in the read-only cell or cancel. If I click OK then everything works fine. My question is How can I deactivate this message to always paste (with copy cell content in read-only cells) without warnings and message boxes ?
I looked in the WinGrid Error event and found MultiCellOperationErrorInfo object, but I didn't find the way to correct this behavior.
Best regards,
Benoit
Hi Benoit,
I think you should be able to achieve what you want with something like this:
private void ultraGrid1_Error(object sender, Infragistics.Win.UltraWinGrid.ErrorEventArgs e) { if (e.ErrorType == ErrorType.MultiCellOperation) { if (e.MultiCellOperationErrorInfo.Operation == MultiCellOperation.Paste && e.MultiCellOperationErrorInfo.CanContinueWithRemainingCells) { e.MultiCellOperationErrorInfo.Action = MultiCellOperationErrorInfo.ErrorAction.Continue; e.Cancel = true; } } }
Hi Mike!
It works great. Thanks. But I still have a problem. I have cells that contains decimal numbers with a display format (to see them as money) and a mask input and these cells do not paste correctly. After paste, the cells contains 0,00$ instead of the amount. Can you explain me why I have this problem ?
I have another decimal number that its display format is percent and the paste works.
Hi Mike,
Yes, I use the latest service release that I can find in my downloads. The version is 10.3. The complete build number is 10.3.20103.1000 in my reference of my project.
Build 1000 is the release version. If you are using build 1000, then you are not using any service release.
I downloaded the latest service release (10.3.20103.2094) and it still doesn't work. The cell with a format (format=c) is not copied successfully.
Hello Francis,
I have logged this as a development issue.
Hello Dave,
is this issue has been resolved in the latest service release?
Hello Benoit,
The issue should be resolved in the next Service Release.