Solved

Display results from click on item in ListView

Posted on 2013-12-13
3
271 Views
Last Modified: 2014-03-21
Hi,

I am using a ListView control to display items. When the user clicks on the taged entry, in the LV I would like to be able to display the results that would be returned from this action in another ListView control.
I attach the code I am using to generate the first ListView.

Any help would be appreciated.
ThanksLV.txt
0
Comment
Question by:Morpheus7
3 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39716926
Hi,

Maybe

Private Sub objListViewItem_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ListView1.MouseDown
    Dim info As objListViewItemHitTestInfo = objListViewItem.HitTest(e.X, e.Y)
    MsgBox (info.Location.ToString())
    If Not IsNothing(info.SubItem) Then
        'info contain the information of the clicked column. You can then go through it's subitems if any
    End If
End Sub

Open in new window

Regards
0
 

Author Comment

by:Morpheus7
ID: 39721573
Hi,

Many thanks for the reply. Could you please explain a bit more, as I am new to VB.
Thanks
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 39755035
Is it correct that you want to load another listview based on what user clicks on in the first listview?
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
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…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now