C# 获取ListView中选中行中对应的列数据

C# 获取ListView中选中行中对应的列数据

 if (MediaList.SelectedIndices != null && MediaList.SelectedIndices.Count > 0)
                {
                    ListView.SelectedIndexCollection c = MediaList.SelectedIndices;
                    string mediaRtspUrl = MediaList.Items[c[0]].SubItems[2].Text.ToString();
                 
                }

 

posted @ 2017-08-06 12:17  easten  阅读(5960)  评论(0编辑  收藏  举报