c# 的listview如何获得第几列 是列不是行

RT
2024-12-18 20:13:02
推荐回答(1个)
回答1:

private void listView1_ItemActivate(object sender, EventArgs e)
{
ListView lv = (ListView)sender;
string filename = lv.SelectedItems[0].SubItems[1].Text;
//获取第1列的值
MessageBox.Show(filename);
}