日期:2014-05-17  浏览次数:21540 次

c# 获取listview 选中行中其中一列的值

listview 删除选中行:

this.lstwlview.Items.RemoveAt(this.lstwlview.SelectedIndices[0]);

listview获取 删除选中行其中一列的值:

                    //获得选择的序列号
                    string ss = "";
                    if (lstwlview.SelectedIndices != null && lstwlview.SelectedIndices.Count>0)
                    {
                        ListView.SelectedIndexCollection c = lstwlview.SelectedIndices;
                        ss = lstwlview.Items[c[1]].Text;
                    }