HOWTO: Prevent Drop from report 1 to report 2 |
Post Reply |
Author | |
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
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 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
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 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|
perrianna
Newbie Joined: 11 August 2009 Location: India Status: Offline Points: 1 |
Post Options
Thanks(0)
|
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...
|
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1198 |
Post Options
Thanks(0)
|
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 19.0.0, new Projects v 19.1.0 Platform: Windows 10 v 1909 (64bit) Language: VC++ 2017 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |