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.
Unfortunately, activation email could not send to your email. Please try again.

Drap and Drop

Thread ID:

Created:

Updated:

Platform:

Replies:

20457 Oct 19,2004 08:07 AM Oct 19,2004 11:15 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On October 19, 2004 08:07 AM

Hello, Does anyone know of the best way to implement drag and drop within a GridControl? I would simply like to drag a control from one cell to another. Thanks, Dennis

Administrator [Syncfusion]
Replied On October 19, 2004 11:15 AM

If you want to drag text (both GridControl & GridDataBoundGrid) or style information (GridControl only), this is supported by just setting grid.AllowDrop = true. Then you can select a range of cels, put your mouse on teh border of the selections, an dthen mousedown and drag the contents to another position in the grid. Now if you want to do some other type of dragging, there are several ways to go about it. One is to turn off the grid''s OLE D&D support, and just use the standard Windows Forms drag events to manage things. If you want to try to work within the grid''s D&D support, then you can handle the QueryOleDataSourceData that is called when a drag is started. There you can add your own data to the e.DataObject. Then handling the grid.DragDrop event will allow you to catch teh drop to handle things there.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;