tags:

views:

524

answers:

1

Hello,

I have a 3 column ListView. I'm having a hard time trying to gather a specific column in the selected rows of the ListView.

I'm trying to do this, but its going through each SubItem of a row.

foreach (ListViewItem.ListViewSubItem lvi in lvScanRepository.FocusedItem.SubItems)
            {
                string selPath = Path.Combine(_savePath, lvi.Text);
                if (File.Exists(selPath))
                    System.Diagnostics.Process.Start(selPath);
            }
+1  A: 

If you know the specific column index, then you can just go:

listView1.SelectedItems[N].SubItems[X].Text;
GenericTypeTea
thank you very much!
Martin Ongtangco