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

problems with copy/paste and drag/drop

hi, 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 PasteCellText: 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? thanks, Corinne

2 Replies

AD Administrator Syncfusion Team April 27, 2004 11:47 AM

Hi Corinne, 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. http://www.syncfusion.com/forums/message.asp?MessageID=11342 Regards, Jay N


CM Corinne Muir April 30, 2004 03:20 PM

Hi Jay, 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.

Loader.
Live Chat Icon For mobile
Up arrow icon