c# winform 如何读取 listview里的每一条数据
展开全部
private void listView1_SelectedIndexChanged(object sender, EventArgs e)
{
if (listView1.SelectedItems.Count > 0)
{
ListViewItem lvi = new ListViewItem();
lvi = listView1.SelectedItems[0];
this.txtTypeName.Text = lvi.SubItems[1].Text;
this.txtTypeDescription.Text = lvi.SubItems[2].Text;
}
}
{
if (listView1.SelectedItems.Count > 0)
{
ListViewItem lvi = new ListViewItem();
lvi = listView1.SelectedItems[0];
this.txtTypeName.Text = lvi.SubItems[1].Text;
this.txtTypeDescription.Text = lvi.SubItems[2].Text;
}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询