Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   [VB] - ListView Drag and Drop (https://thetfp.com/tfp/tilted-technology/76506-vbulletin-listview-drag-drop.html)

11-19-2004 02:09 PM

[VB] - ListView Drag and Drop
 
I've got 3 database tables:
accounts
groups
links

accounts and groups both store top-level header information. The links table links the accounts into the groups on a many to many basis.

So what I want is for the user to see which accounts are in which groups(done), and also for them to drag the accounts from one group to another.

I've set up a form with a TreeView displaying the groups. Clicking on a node loads the attached accounts into a ListView.

I've got a second pair of TreeView and ListView controls underneath. What I want to do is to let the user drag an account from the top view and drop it into whatever group they want on the bottom view (or vice-versa). Of course, I need to perform all the appropriate sql to edit/add rows into my links table, but it's the actual implementation of the Dragging and Dropping that I can't seem to get my head around.

Has anyone done anything like this who can give me some tips?

11-19-2004 05:26 PM

Ahh it's ok, I figured it out - I used the OLEStartDrag and OLECompleteDrag events.
First I stored the indexes of the selected data in a global variable, and then sent it back in on the CompleteDrag event.


All times are GMT -8. The time now is 01:32 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54