We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

ApplyFormattedText not working after a Paste

I have a simple search and replace routine that uses ApplyFormattedText to put the new data into some cells on a bound grid. Works fine, until you do any copy/paste anywhere in the grid. After that, the ApplyFormattedText no longer modifies the cell. It appears to succeed, but the data doesn''t appear in the grid, nor is the underlying data modified. Ever seen this?

5 Replies

AD Administrator Syncfusion Team April 20, 2005 06:00 PM UTC

Haven''t really seen this before. Are you calling grid[row,col].ApplyFormattedText? You might check your output window to see if there are any exceptions being thrown that might affect this. I tried to reproduce this problem this sample, but could not. http://www.syncfusion.com/Support/user/uploads/DataGrid_CalculatedCols_31cd07f6.zip Can you see it in this sample?


JE Jan Eugenides April 20, 2005 06:17 PM UTC

I think I found the issue, by tracing into the CutPaste.Paste routine. Our code is using DirectSaveCellInfo=true, and at the end of the CutPaste.Paste routine, the syncfusion routines set DirectSaveCellInfo=false. After this our grid of course behaves strangely. I put in a line to explicity set DirectSaveCellInfo back to true after the paste, and now it all works again. The question is, why is the Paste setting this value?


AD Administrator Syncfusion Team April 20, 2005 06:45 PM UTC

The paste does this to prevent CurrencyManager position from changing if you paste across several rows. But we should save the setting before we cahnge it and restore it to what it was previously after we use it instead of just setting it back to false. I will forward this onto the grid architect to see if he will make this change. Until there is a build that has this modified, you can try handling the grid.Model.ClipboardPasted event and set it back to true in your handler.


AD Administrator Syncfusion Team June 28, 2005 03:22 PM UTC

Was this issue already fixed in latest release? >The paste does this to prevent CurrencyManager position from changing if you paste across several rows. > >But we should save the setting before we cahnge it and restore it to what it was previously after we use it instead of just setting it back to false. I will forward this onto the grid architect to see if he will make this change. > >Until there is a build that has this modified, you can try handling the grid.Model.ClipboardPasted event and set it back to true in your handler.


AD Administrator Syncfusion Team June 28, 2005 03:43 PM UTC

No. This is still an open issue. http://www.syncfusion.com/support/issues/grid/Default.aspx?ToDo=view&questId=462

Loader.
Live Chat Icon For mobile
Up arrow icon