怎样获取listview中选中那行的指定单元格内容。。。。。。。。。。
想得到选中那行第一个单元格的内容,,,,
------解决方案--------------------
private void button1_Click(object sender, EventArgs e)
{
//第一项第一单元格值
MessageBox.Show(LVData.Items[0].SubItems[0].Text);
}
private void Form1_Load(object sender, EventArgs e)
{
this.LVData.Columns.Add("A", 70, HorizontalAlignment.Left);
this.LVData.Columns.Add("B", 70, HorizontalAlignment.Left);
this.LVData.Columns.Add("C", 70, HorizontalAlignment.Left);
LVData.View = View.Details;
string[] str = new string[3];
string[] str2 = new string[3];
str[0] = "1";
str[1] = "11";
str[2] = "111";
ListViewItem item = new ListViewItem(str, 0);
LVData.Items.Add(item);
str2[0] = "2";
str2[1] = "22";
str2[2] = "222";
ListViewItem item2 = new ListViewItem(str2, 0);
LVData.Items.Add(item2);
}