Solved

Listview Drag and drop events

Posted on 2008-06-18
2
263 Views
Last Modified: 2010-04-21
I have a listview that is populated from a database.
I need to be able to drag an item from the listview to a treeview and perform subsequent operations.
Everything works fine except...

How do I determine the text of the item that is being dragged from the listview if the user just left clicks and hold down the mouse key and drags.
I have tried a variety of events but none seem to fire at the right time.  
I am using Visual studio 2008 using .net 2.0 framework.
0
Comment
Question by:vollmesg
2 Comments
 
LVL 7

Accepted Solution

by:
AUmidh earned 125 total points
ID: 21819047
When you click on listview item for draging the first operation is it selected. so you can get its text as
Dim strText as String=listview1.SelectedItems(0).Text;
0
 

Author Closing Comment

by:vollmesg
ID: 31468553
Thanks. This only seems to work on the dragdrop event.  That was my problem.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question