Dear support,
I tried to manage copy-and-paste within the grid but when cells are in edit mode user encounter the follow error:
cannot convert string to System.Datetime
if the cell ( both source and target ) are set with editmask = Datetime.
Is there a way to handle this?
Also, if I have a cell with special characters ( e.g. <tab>, <CR><LF> ) is there a way to copy and paste? Or do I have to use escape characters during the process?
Thanks!
Hi,
What do you mean by "manage copy-and-paste within the grid"? Are you writing code to handle this yourself? Or are you using the AllowMultiCellOperation property to enable this in the grid automatically?
Are you copying selected cells or rows? Or copying text from within a cell?
What version of the grid are you using?
Although I am using the 'AllowMultiCellOperation' property to do the copy/paste, the 2 indicated problems are actually not related to the multiCellOperation -- since both happens when in edit mode. Simply copying the 'text' within grid with editmask ( e.g. date field ) fails.
The Infragistics version is dated 2009.2.
So where are you copying from and where are you copying to?
I tried this out by copying from a DateTime cell in the grid and pasting into another DateTime cell in the grid (in a different column) and it worked just fine for me.
Hi Mike,
Thanks for following up. The copy / paste happens BOTH in edit mode -- I first copy the text of a date cell ( with date edit mask ) in edit mode, then go to another row in the same column, goes into edit mode, then paste. Then the error occurs.
Hm, that's really odd.
I tried this with two different columns and it worked fine for me. I figured maybe you were copying from a column with a different mask or format than the column are you pasting to and that might have accounted for the error. But if you are copying to and from the same column, then clearly that's not the case.
That leaves us with 2 possibilities:
1) This is a bug in the version you are using and you need to update.
How to get the latest service release - Infragistics Community
2) This is caused by some other settings that you are using in your grid that is set to the default in mine. If that's the case, then I'd need to see a small sample project so I can try to reproduce the error here.