Tilted Forum Project Discussion Community  

Go Back   Tilted Forum Project Discussion Community > Interests > Tilted Technology


 
 
LinkBack Thread Tools
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?
 
Old 11-19-2004, 05:26 PM   #2 (permalink)
zen_tom
Guest
 
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.
 
 

Tags
drag, drop, listview


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 08:39 PM.

Tilted Forum Project

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, 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 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73