GGC Default Copy/Paste

Hi, i'm just trying to turn on whatever out of the box functionality exists for copying to the clipboard on the GridGroupingControl.

I don't need to paste into the grid at all, just copy out so the user can past into excel.

What is the least amount of code I have to write to turn on Copy.

3 Replies

HA haneefm Syncfusion Team April 27, 2007 07:28 PM UTC

Hi Eric,

One way you can do this by handling the ClipboardPaste event from the GridTableModel and set the e.Handled to true for cancelling paste operation in a grid cell. Here is a code snippet

this.grid.TableModel.ClipboardPaste +=new GridCutPasteEventHandler(Model_ClipboardPaste);

private void Model_ClipboardPaste(object sender, GridCutPasteEventArgs e)
{ e.Handled = true;}

Best regards,
Haneef


EW Eric Weinschenk April 30, 2007 03:07 PM UTC


Haneef,

The question isn't how to turn off Paste. The question is how to turn ON copy.

Eric

>Hi Eric,

One way you can do this by handling the ClipboardPaste event from the GridTableModel and set the e.Handled to true for cancelling paste operation in a grid cell. Here is a code snippet

this.grid.TableModel.ClipboardPaste +=new GridCutPasteEventHandler(Model_ClipboardPaste);

private void Model_ClipboardPaste(object sender, GridCutPasteEventArgs e)
{ e.Handled = true;}

Best regards,
Haneef


HA haneefm Syncfusion Team April 30, 2007 05:54 PM UTC

Hi Eric,

If you want to turn on the copy/paste support in a grid, you need to set the ClipboardFlags.

this.grid.TableModel.CutPaste.ClipboardFlags = GridDragDropFlags.Styles;

Please refer the below forum thread for more details.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=58995

Best regards,
Haneef

Loader.
Up arrow icon