Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Listview Drag and drop events

Posted on 2008-06-18
2
262 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 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