Click on listview = (action) [Help]

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts Page 1 of 1
Contributors
User avatar
CodenBoy
Top Poster
Top Poster
Posts: 103
Joined: Sun Jul 15, 2012 4:06 pm

Hello,

I need help with this, i have a Listview with "Details" not "large icon", ok and 2 colums and what i wanna is, I have 2 coloms and 1 is "Name" and one is "Email", i want when i click on any name , it will put the email in label1.text

how? i mean when i click the name it will copy the email to label1.text

thx!!!!
User avatar
XTechVB
VIP - Site Partner
VIP - Site Partner
Posts: 727
Joined: Thu May 20, 2010 10:32 am

you mean something like this

put this in the listview's ItemSelectionChanged event
Code: Select all
label1.Text = e.Item.SubItems(1).Text
You can find me on Facebook or on Skype mihai_92b
User avatar
CodenBoy
Top Poster
Top Poster
Posts: 103
Joined: Sun Jul 15, 2012 4:06 pm

Thanks braw :) its simple :D
3 posts Page 1 of 1
Return to “Coding Help & Support”