AD
Administrator
Syncfusion Team
March 18, 2004 11:13 AM UTC
If you are copying from one GridControl to another GridControl, the default behavior is to copy the style.
But if you are using a GridDataBoundGrid, then it normally only copies text. The reason is that cells in a GridDataBoundGrid ''inherit'' the style properties (than the cell text) from the GridBoundColumn.StyleInfo for that column. Individual cells to not save style properties.
One way you can handle this is to subscribe to the ClipboardCopy event, and handle all the work yourself. You can place whatever you want on the clipboard, and that could be pasted later.
If you look at this forum thread, http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=9906, it has code to use clipboardcopy. Now you would not want to skip the hidden columns (maybe, ???), and instead of using the GridData object (that only applies to GridControl), you would index the GridDataBoundGrid and retrieve its formattedtext property.
s += this.gridDataBoundGrid[row, col].FormattedText;