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

RTFText Loosing the Format

Clay, RichText is loosing the Format, once the user copies and pasted the row. Please find the sample. Could you please tell me what''s the problem. Thanks Satish SampleApplication_1782.zip

3 Replies

Administrator April 19, 2004 10:05 PM UTC

GridDataBoundGrid only copies Text. It does not copy Style information or RTF to the clipboard. If you want to support this, you will have to handle grid.Model.ClipboardCopy and place you own custom RTF object on the clipboard, and handle grid.Modfel.ClipboardPaste and paste your custom object. Now, I am not sure how you want to handle teh problem of your user pasting RTF into a column you have not set up to handle RTF. That is what your ClipBoardPaste handler would have to do.

SA Satish April 21, 2004 12:56 AM UTC

Clay, I need to copy and paste from only RTF Control not to any other control. Do you have sample? Thanks Satish >GridDataBoundGrid only copies Text. It does not copy Style information or RTF to the clipboard. > >If you want to support this, you will have to handle grid.Model.ClipboardCopy and place you own custom RTF object on the clipboard, and handle grid.Modfel.ClipboardPaste and paste your custom object. Now, I am not sure how you want to handle teh problem of your user pasting RTF into a column you have not set up to handle RTF. That is what your ClipBoardPaste handler would have to do.

Administrator April 21, 2004 08:23 PM UTC

No, I do not have a sample. To make up a sample to do this would take a few hours or more. The things that complicate the coding are situations where your user copies several cells, some RTF and some not. And then tries to paste to some part of the grid that may or may not match up the RTF cells properly. And even if the RTF cells match properly, you also have to handle the rest of the cells as well. It would take some time to work through this task.
Loader.
Live Chat Icon For mobile
Up arrow icon