关于ListView 和数组的问题

xuzhibin2005 2006-01-20 05:11:08
请问如何把数组的数据添加到ListView中.
谢谢!
...全文
104 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
lovvver 2006-01-21
  • 打赏
  • 举报
回复
如果数组(myArray:string[])是放到一条记录:
this.listView1.Items.Add(new ListViewItem(myArray));
如果放在多行:
foreach(string s in myArray)
{
this.listView1.Items.Add(new ListViewItem(new string[]{s}));
}
moonfkypm 2006-01-20
  • 打赏
  • 举报
回复
this.listView1.Items.Add(new ListViewItem(new string[]));

110,531

社区成员

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

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

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