Vb.Net - ListView - display items
-
I have a listview with values Salary Name Department 2000 Peter Accounts 1000 Anne Sales If I want the salary, I have the following code that works MsgBox(lvwListView.SelectedItems(0).Text) This gives me a value of 2000. What is the code if I want to display their Name or the Department instead of salary
-
I have a listview with values Salary Name Department 2000 Peter Accounts 1000 Anne Sales If I want the salary, I have the following code that works MsgBox(lvwListView.SelectedItems(0).Text) This gives me a value of 2000. What is the code if I want to display their Name or the Department instead of salary
-
I have a listview with values Salary Name Department 2000 Peter Accounts 1000 Anne Sales If I want the salary, I have the following code that works MsgBox(lvwListView.SelectedItems(0).Text) This gives me a value of 2000. What is the code if I want to display their Name or the Department instead of salary
Try changing the selected items to 2 ie MsgBox(lvwListView.SelectedItems(2).Text) You should also be able to refer to the name of the field ie MsgBox(lvwListView.SelectedItems("Department").Text) Cheers Ants