本文介绍了从listview获取SubItem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从列表视图中获取Subitem,我这样做但不起作用:

  curItem1 = listView2 - > Items [i]  - > Text; 

curItem2 = listView2-> SubItem [i] - > Text;


解决方案
  ListViewItem selItem = listView1.Items [i]; 
string txt = selItem.SubItems [index] .Text;

要获得 Text


I am trying to get Subitem from a list view, I did this but doesn't work:

curItem1=listView2->Items[i]->Text;

curItem2=listView2->SubItem[i]->Text;
解决方案
ListViewItem selItem = listView1.Items[i];
string txt = selItem.SubItems[index].Text;

To get the Text is wrong in first line.

这篇关于从listview获取SubItem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-18 03:03