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

GroupView ItemDrag event

Thread ID:





366 Jun 12,2002 09:48 AM UTC Jun 18,2002 08:50 PM UTC WinForms 5
Tags: Tools
Sebastien Lange
Asked On June 12, 2002 09:48 AM UTC

Hi, 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? Thanks, Sebastien

Prakash S [Syncfusion]
Replied On June 12, 2002 06:27 PM UTC

Sebastien, 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. Thanks, Prakash

Sebastien Lange
Replied On June 13, 2002 12:01 PM UTC

Prakash, How can I get the RC2? I do not see where to download it. Thanks, Sebastien

Prakash S [Syncfusion]
Replied On June 13, 2002 01:37 PM UTC

Sebastien, 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. Regards, Prakash

Sebastien Lange
Replied On June 18, 2002 08:00 AM UTC

Prakash, I'm using RC2 now. I set GroupView.AllowDragDrop to true. In the DragEnter event I'm looking wheither it is a GroupViewItem dragged: if (e.Data.GetDataPresent("Syncfusion.Windows.Forms.Tools.GroupViewItem",false)) 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. Sebastien

Prakash S [Syncfusion]
Replied On June 18, 2002 08:50 PM UTC

Sebastien, 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 } } Thanks, Prakash


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