In the common treeview, you have the ItemDrag event that lets you drag an item and then drop it somewhere.
I see there isn't an ItemDrag event in the GroupView. How can I drag a GroupViewItem? Do I have to detect it myself using mousemove and mousedown?
PSPrakash S Syncfusion Team June 12, 2002 02:27 PM
The GroupView control has a built-in drag & drop implementation and this is, by default, turned on in the RC1 release of Essential Tools. So, unless the Control.AllowDrop property has been set to FALSE, the control will allow GroupViewItems to be dragged and dropped within and between controls. For drag and drop to work accurately, the GroupView.ItemSpacing value should be sufficiently large(>= 2) to allow the insert arrows to be drawn.
Please note that in Essential Tools RC2 a new GroupView.AllowDragDrop property has been provided and this is set to FALSE by default.
SLSebastien LangeJune 13, 2002 08:01 AM
How can I get the RC2? I do not see where to download it.
PSPrakash S Syncfusion Team June 13, 2002 09:37 AM
We are currently wrapping up on testing with the RC2. This should be available within a few hours. All our customers will be notified when the download is ready.
SLSebastien LangeJune 18, 2002 04:00 AM
I'm using RC2 now. I set GroupView.AllowDragDrop to true.
In the DragEnter event I'm looking wheither it is a GroupViewItem dragged:
e.Effect = DragDropEffects.Copy;
But the format of the data dragged is: GroupViewFormatName.
What can I do with this format? I do not see a GroupViewFormatName class.
Remark: the control where I drop items is not a Syncfusion one.
PSPrakash S Syncfusion Team June 18, 2002 04:50 PM
The GroupView control uses a custom format type for drag & drop. The format name is represented by the GroupView.GroupViewFormatName string constant. The correct way to access the GroupViewItem being dragged is to first verify the format and then use this format name to get the data.
Unfortunately, exposing this format type was not part of the original design and hence the GroupView.GroupViewFormatName member is protected in scope. I have made the required corrections and GroupView.GroupViewFormatName will be accessible and also documented in the future.
We are currently in the process of putting together a revision for the RC2 and this update will include the above mentioned change. The should be available within the next couple of days and you will be notified. The following approach may be used once you have the update,
private void myControl1_DragEnter(object sender, System.Windows.Forms.DragEventArgs e)
if(e.Data.GetDataPresent(Syncfusion.Windows.Forms.Tools.GroupView.GroupViewFormatName) == true)
Syncfusion.Windows.Forms.Tools.GroupViewItem item = e.Data.GetData(Syncfusion.Windows.Forms.Tools.GroupView.GroupViewFormatName) as Syncfusion.Windows.Forms.Tools.GroupViewItem;
// Process Drag Enter