首页 > 其他 > 详细

循环遍历listview 控件中Subitems 值

时间:2017-12-05 00:28:24      阅读:245      评论:0      收藏:0      [点我收藏+]

I was wanting to be able to iterate through each of my ListViews sub items and get the value from each. I have tried various things but am finding it really difficult to just get the sub item text from the second column, not the items text from the first column. Thanks.

 

foreach (ListViewItem itemRow in listView1.Items)
{             
    for (int i = 0; i < itemRow.SubItems.Count; i++) 
    {
        string dueDate = itemRow.SubItems[i].Text;
        MessageBox.Show(dueDate);
    }
}

 

循环遍历listview 控件中Subitems 值

原文:http://www.cnblogs.com/springcloud/p/7979550.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!