We have a virtual grid (implemented QueryCellInfo, QueryRowCount, QueryColCount, SaveCellInfo) using version 1.6.
We implemented our own drag and drop because we needed to add new rows to the grid. (AllowDrop=true, our own handlers for DragEnter, DragDrop. The drag and drop wouldn''t work until we added the following handler for
private void gridControl_PasteCellText(object sender, GridPasteCellTextEventArgs e)
e.Cancel = true;
This made the drag and drop work but we can''t seem to get the copy / paste to work. It doesn''t even break inside any of these events.
We tried changing the properties of
this.gridControl.ControllerOptions both with the oleDataSource and oleDropTarget checked and unchecked but it didn''t appear to make a difference.
We tried setting this handler but it also didn''t ever get to it:
this.gridControl.ClipboardPaste += new Syncfusion.Windows.Forms.Grid.GridCutPasteEventHandler
What are we doing wrong?
ADAdministrator Syncfusion Team April 27, 2004 10:47 AM
Cancelling the PasteCellText event will not allow you to do the paste operation. Probably you should check your drag/drop implementation.
Here is a forum thread where Clay posted a sample that does drag/drop which adds rows to the target grid.
CMCorinne MuirApril 30, 2004 02:20 PM
our copy/paste problem turned out to be the MDI child form was eating these events so the grid copy was never called.
We changed our drag and drop to use the default grid drag and drop by implementing the GridDataObjectConsumer class. That worked great.
So everything is working now.