码迷,mamicode.com
首页 > 其他好文 > 详细

循环遍历listview 控件中Subitems 值

时间:2017-12-05 00:57:14      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:ble   through   bit   ext   date   not   div   iter   .sh   

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 值

标签:ble   through   bit   ext   date   not   div   iter   .sh   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!