Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - How to reorder rows using drag & drop
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to reorder rows using drag & drop

 Post Reply Post Reply
Author
Message
Tommy6502 View Drop Down
Newbie
Newbie


Joined: 23 December 2005
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tommy6502 Quote  Post ReplyReply Direct Link To This Post Topic: How to reorder rows using drag & drop
    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.
Back to Top
Tommy6502 View Drop Down
Newbie
Newbie


Joined: 23 December 2005
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tommy6502 Quote  Post ReplyReply Direct Link To This Post 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.  
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.