C#中listview 选中一行并把对应的几列数据放到textbox中

将下面的一段代码写入就行了

private void listView6_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listView6.SelectedItems.Count == 0)
                return;
            ListViewItem item = listView6.SelectedItems[0];
            textBox8.Text = item.SubItems[0].Text;
            textBox9.Text = item.SubItems[1].Text;
            textBox49.Text = item.SubItems[2].Text;
            textBox10.Text = item.SubItems[3].Text;
        }


你可能感兴趣的:(c#)