Windows mobile开发 “System.Windows.Forms.ListView”不包含“SelectedItems”的定义

lovefhp 2010-01-10 10:20:27
Windows mobile开发 “System.Windows.Forms.ListView”不包含“SelectedItems”的定义
怎么回事?
怎么取得listview被选中的值?单行的
...全文
202 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lovefhp 2010-01-10
  • 打赏
  • 举报
回复
谢谢二楼的,值是取到了,但是不知道为什么提示不包含“SelectedItems”的定义,我看对象浏览器里是有的.三楼的没用,错误 CS0426: 类型“System.Windows.Forms.ListView”中不存在类型名称“SelectedListViewItemCollection”
wuyq11 2010-01-10
  • 打赏
  • 举报
回复
ListView listView1 = new ListView();
ListView.SelectedListViewItemCollection c= listView1.SelectedItems;
flyerwing 2010-01-10
  • 打赏
  • 举报
回复
ListView1_SelectIndexChanged(object sender,EventArgs e)
{
if(ListView1.FocusItem!=null)
{
string a=ListView1.FocusItem.Text;
....
}
}
大概这个,楼主看下了有用没

111,120

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧