Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

listview: getting subitem text

i have a listview with the following columns id, surname, firstname. i want to get the surname when a row is selected how do i do it using visual c# 2008?

like image 465
user636634 Avatar asked May 13 '26 21:05

user636634


1 Answers

subscribing SelectedIndexChanged for ListView1:

ListView1.SelectedItems[0].Subitems[1].Text

you have some tons of microsoft documentation about it..

http://msdn.microsoft.com/en-us/library/system.windows.forms.listviewitem.listviewsubitem.aspx

like image 188
Tobia Zambon Avatar answered May 15 '26 10:05

Tobia Zambon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!