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

Drap and Drop

Thread ID:





20457 Oct 19,2004 12:07 PM UTC Oct 19,2004 03:15 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On October 19, 2004 12:07 PM UTC

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 03:15 PM UTC

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.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon