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();
                 
                }

 

相关文章: