listbox drag-n-drop - is it possible on a webform?

J

James Radke

Hello,

I was curious, is it possible to create drag and drop interface from listbox
to listbox on a webform application (i.e. vb.net)? Basically the
application would need to load multiple listboxes with values from a
database, allow the user to drag and drop from a listbox to a different
listbox and would 'move' the item and update the database accordingly?

If so, would anyone have any examples of how to do this?

Thanks!

Jim
 
A

Alvin Bruney

yes this is possible, but not really worth the grease. here is how i did it
(but it was a lot of unappreciated effort)

This is heavy javascript by the way.
wrap whatever you want to drag in a div tag. since javascript does not
support drag and drop you will need to manually implement it yourself by
hooking into the mouse over, mouse release and mouse click events. That will
give you your drag effect while the mouse is held down. when you release,
you need to process your data transfer in the mouse up event. You will need
to retrieve the variable at the end of the mouse pointer. when you release,
you need to just add that variable to the listbox or whatever the drop
target is. (still want to play?)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top