Skip to main content
edited body
Source Link
Bala R
  • 109.4k
  • 23
  • 203
  • 212

You can try something similar to this (you'll have to tweak it for your setup)

If listView.SelectedItems.Count > 0 Then textBox.Text = listView.SelectedItems(0).SubItems(01).Text End If 

if you don't like the idea of using column index and if you have your columns setup right then you should be able to do .SubItems("ID").Text

You can try something similar to this (you'll have to tweak it for your setup)

If listView.SelectedItems.Count > 0 Then textBox.Text = listView.SelectedItems(0).SubItems(0).Text End If 

if you don't like the idea of using column index and if you have your columns setup right then you should be able to do .SubItems("ID").Text

You can try something similar to this (you'll have to tweak it for your setup)

If listView.SelectedItems.Count > 0 Then textBox.Text = listView.SelectedItems(0).SubItems(1).Text End If 

if you don't like the idea of using column index and if you have your columns setup right then you should be able to do .SubItems("ID").Text

Source Link
Bala R
  • 109.4k
  • 23
  • 203
  • 212

You can try something similar to this (you'll have to tweak it for your setup)

If listView.SelectedItems.Count > 0 Then textBox.Text = listView.SelectedItems(0).SubItems(0).Text End If 

if you don't like the idea of using column index and if you have your columns setup right then you should be able to do .SubItems("ID").Text