Print Page | Close Window

How to reorder rows using drag & drop

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=10532
Printed Date: 16 November 2024 at 3:25pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to reorder rows using drag & drop
Posted By: Tommy6502
Subject: How to reorder rows using drag & drop
Date Posted: 06 May 2008 at 5:57pm
I would like to be able to allow the user to change the order of the rows in a report control by using drag & drop.   My report control is not using a tree.  It is just a simple list with two columns, but it does use the virtual mode.
 
I tried using EnableDragDrop(), but this doesn't work.
 
What do I need to do to enable drag and drop to allow someone to change the order of the rows?  What event do I catch to know when they have dropped a row in another location?
 
Thank you.



Replies:
Posted By: Tommy6502
Date Posted: 12 May 2008 at 10:35am
I resolved the problem myself.
 
I wasn't calling AfxOleInit() in InitInstance of the application class, this prevented the drag cursors to appear.  I override the OnDrop member function of the CXTPReportControl to implement drop, since the base class doesn't support dropping when using VirtualMode.
 
I put all my records in my own CArray and used virtual mode to display over 100,000 records!  It takes a few seconds to load, but is real fast once it is loaded.  
 
 



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