How to obtain data in a row in List view
Hi,
I am new to C# programming.
I have a question on how to obtain data in a row in List View.
My list view has 2 columns
Last First
Doe John
Mary Betty
Everytime a user clicks on a row in List view, I need to get both Doe and John.
I have the listView_SelectedIndexChanged function that will get kick in every time a user clicks on a row.
private void listView_SelectedIndexChanged(object sender, System.EventArgs e)
{
textBox1.Text = listView1.SelectedItems[0].Text; //this only give me Doe without John how can I also get John? Do I have to use SubItems in this case?
}
Any helps will be greatly appreciated
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

jcity444Rank #3,217 · 446 reputationPosted May 11, 2004, 4:28 PM EDT
b0nn198 reputationPosted May 13, 2004, 10:27 AM EDT