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

Display results from click on item in ListView

Posted on 2013-12-13
3
279 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 50

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
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…

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