Get value in first column when user clicks on row

  • Thread starter Thread starter Krish
  • Start date Start date
K

Krish

Really appreciate some help.

I have a listview, I am clicking on a row, I would like to extract the
value that is stored in the first column of that row. I tried using
ItemActivate
but donot know how to access the values, any help really appreciated.

thanks
 
Krish said:
I have a listview, I am clicking on a row, I would like to extract the
value that is stored in the first column of that row. I tried using
ItemActivate
but donot know how to access the values, any help really appreciated.

Something like this?

private void lvwLog_ColumnClick(object sender,
System.Windows.Forms.ColumnClickEventArgs evt)
{
if (lvwLog.Items.Count>0)
MessageBox.Show(lvwLog.Items[0].SubItems[evt.Column].Text);
}

HTH,

Michael
 
Back
Top