How to reorder rows using drag & drop |
Post Reply |
Author | |
Tommy6502
Newbie Joined: 23 December 2005 Status: Offline Points: 5 |
Post Options
Thanks(0)
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.
|
|
Tommy6502
Newbie Joined: 23 December 2005 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
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.
|
|
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 |