I'd like my users to be able to paste in more rows than my current DataGrid has. I am using the ClipboardPasting event to place the clipboard values into my dataGrid and would like add new rows and paste into them if the paste has more rows than the grid. I see that in the ClipboardOperationError I can disable the throwing of the dialog and continue with the operation, however the clipboard gets truncated to the size of my grid. How can I get the full clipboard and not the truncated one?
Chip
Hello Chip,
I am just checking the progress on your issue.
Please let me know if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics, Inc.
www.infragistics.com/support
I have created a simple sample application that demonstrates an approach for achieving your goal. Using the XamDataGrid’s ExecutingCommand event you can check the type of the command and if it is Paste you can get the data that is about to paste in the XamDataGrid from the clipboard and if there are no enough rows to paste it to you can add the necessary rows in directly in the data source of your XamDataGrid.
The full clipboard can be reached by using the Clipboard class. This class provides static methods that facilitate transferring data to and from the system Clipboard. You can learn about this class and its methods here: http://msdn.microsoft.com/en-us/library/system.windows.clipboard.aspx
Please let me know if this is what you needed or if you require any further assistance on the matter.