Solved

Display results from click on item in ListView

Posted on 2013-12-13
3
282 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
[X]
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
3 Comments
 
LVL 51

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

751 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