Print Page | Close Window

HOWTO: Prevent Drop from report 1 to report 2

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=14774
Printed Date: 14 July 2025 at 4:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: HOWTO: Prevent Drop from report 1 to report 2
Posted By: mgampi
Subject: HOWTO: Prevent Drop from report 1 to report 2
Date Posted: 20 July 2009 at 5:23am
Hi;

I created an MDI application that contains report controls of same type and content in different views. It should be possible to use drag & drop to rearrange items within one report control but not to move/copy records from one report control to the other using drag & drop.
Ho can I prevent this?


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022



Replies:
Posted By: mdoubson
Date Posted: 21 July 2009 at 4:48pm
Use app level to receive OnDragBegin notification and OnDragOver
Change dynamically m_dwDragDropFlags for all reports except originator to not allow to drop state using CXTPReportControl::EnableDragDrop funciton. Now you can drop you records only inside originator report control


-------------
Mark Doubson, Ph.D.


Posted By: mgampi
Date Posted: 22 July 2009 at 3:29am
Hi;
I did it al little bit different. Since I don't wnat to enumerate all active report control instances I decided to use a bool flag that is set when a drag operation starts and reset after a drop. In all other report control instances, this flag can't be set. Flag not set --> drop disabled.


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022


Posted By: perrianna
Date Posted: 11 August 2009 at 9:14am
 
To prevent the drag and drop property of your XTPReport Control, Pass NULL value to the EnableDragDrop function.
This will disables the drag and drop operation.
 
       rptMemberVar.EnableDragDrop(_T("Class"), NULL);
 
 
Override the OnBeginDrag, OnDrop method to customize your drag and drop operations.
 
=======================================
 
 
hi everyone...
 


Posted By: mgampi
Date Posted: 12 August 2009 at 8:50am
Originally posted by perrianna perrianna wrote:

 
To prevent the drag and drop property of your XTPReport Control, Pass NULL value to the EnableDragDrop function.
This will disables the drag and drop operation.
 
       rptMemberVar.EnableDragDrop(_T("Class"), NULL);
 
 
Override the OnBeginDrag, OnDrop method to customize your drag and drop operations.
 
=======================================
 
 
hi everyone...
 
Hi;
as mentioned before, I solved it already! I don't want to disable drag&drop completely, I only wanted to disable drag&drop between different instances of the same report control class.


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net