如何用dataset获取listView数据并让dataGriView绑定dataset? (求代码)

[复制链接]
查看11 | 回复3 | 2012-3-20 15:26:16 | 显示全部楼层 |阅读模式
用dataset获取listView数据: DataSet ds = new DataSet(); foreach (DataRow aRow in ds.Tables[0].Rows) {
ListViewItem lsvItem = listView1.Items.Add(aRow[0].ToString());
for (int j = 1; j < ds.Tables[0].Columns.Count ; j++)
lvItem.SubItems.Add(aRow[j].ToString());...
回复

使用道具 举报

千问 | 2012-3-20 15:26:16 | 显示全部楼层
DataTable dt=new DataTable("dt");DataRowCollection dr=new DataRowCollection();
DataTable dt = new DataTable("dt");
DataRowCollection drc=null;
...
回复

使用道具 举报

千问 | 2012-3-20 15:26:16 | 显示全部楼层
说来话长。等你上线说吧。...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行