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.

Drag and Drop internal vs external

Thread ID:

Created:

Updated:

Platform:

Replies:

36336 Oct 26,2005 11:42 PM Nov 7,2005 07:18 AM Windows Forms 4
loading
Tags: GridControl
Stephen Trinder
Asked On October 26, 2005 11:42 PM

Hi. I''m using the gridcontrol in 3.0.1.0. I have two grids on screen. Both have AllowDragRow and AllowDrop set to true. When dragging a row from one to the other, you have to be fairly exact as to where in the header cell you click and hold down the mouse. More often than not, I get the horizontal "I" symbol appearing which indicates the drag and drop will be internal (i.e. I can only move the row inside the current grid). If you don''t get the "I", I can move the row externally (i.e. from one grid to the other). Is there any way I can turn off internal movement, so any time a row header is clicked (to be dragged) the "I" doesn''t appear and I can move the row to the other grid? Thanks, -Stephen

Administrator [Syncfusion]
Replied On October 27, 2005 03:25 AM

What you refer to as ''internal'' is really a move action. When this happens the row is removed from its old location and inserted in a new location in the same grid. The total number of rows in the grid does not change. This behavior is enabled by setting grid.Model.AllowDragSelectedRows to true. If you do not want it supported, then set it to false. The other action, dragging to another grid is OLE drag and drop support. To initiate a D&D action, you first select a range of cells (could be a row), then you move the cursor close to any border of a selection to get the dragdrop cursor displayed. You then can mouse down and drag the selection either to a new place in the same grid or to some other OLE D&D drop target. But this second action is different in that when you drop the data, it replaces the old with the new dropped date. This is different that the first action which inserted the data. Another difference is that the first action is started by mousing down in the interiro of a selected header row cell. The second action is initiated by mousing down at the edge of a selected range. You can control the size of the selection edge by setting this static member. It defaults to 4. GridOleDataSourceMouseController.HitTestSelectionEdge = 8;

Stephen Trinder
Replied On October 27, 2005 09:09 PM

Great stuff! Thanks for the response Clay. That info is all I need so my useless boss can actually grab the row and move it, without getting it wrong. Cheers!

ilan kol
Replied On November 7, 2005 04:23 AM

Hi, I have some question about drag and drop in Grid Control. I created my own userContorl, which contain Sysncfusion’s GridControl and other controls. And I want to allow drag and drop from rows in the grid to another control in different form. I tried to handle the OnDragEnter, OnDragOver, OnDragDrop events(and ofcourse set the grid''s allow drag properties to true) in the User Contorl but there are some problems: (1) when an automatic icon of “allow drag” is appearing, then those events are ignored and I cannot perform the drag operation as I planned. (2) When this icon is not appearing, I handle the drag with no problem (catch the drag&drop events as expected) (3) I want to forbid drop in the same grid that I started drag from. (4) The event OnCellMouseDown is not working (Why??) so I use instead the event OnMouseDown to start the drag operation. (Which is ok by me) (5) Could you send me an example of how to drag certain row with the cell.text as an the dragDropIcon, to drop it to another grid, and alos to drop it to another control? Thank’s in advance. Best Regards Ilan kalmanovich Elta systems Israel.

Administrator [Syncfusion]
Replied On November 7, 2005 07:18 AM

Hi Ilan, We have updated your incident(22000) for this query. Best Regards, Jeba.

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.

;