View Single Post
Old 11-19-2004, 02:09 PM   #1 (permalink)
zen_tom
Guest
 
[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?
 
 

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 55 56 57 58 59 60 61 62