标题:帮忙看下好吗?
取消只看楼主
999
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2005-10-20
 问题点数:0 回复次数:0 
帮忙看下好吗?

private void button1_Click(object sender, System.EventArgs e) { listView1.Items.Clear();

for (int i=0;i< myTable.Rows.Count;i++) { this.myRow = myTable.Rows[i]; this.myTable = ds.Tables[0]; ListViewItem altem= new ListViewItem(myRow[1].ToString().Trim()); DataColumn[] keys = new DataColumn[1]; keys[0]=ds.Tables["t_tz"].Columns["t_zcbh"]; ds.Tables["t_tz"].PrimaryKey =keys; altem.SubItems.Add(myRow[1].ToString().Trim()); altem.SubItems.Add(myRow[2].ToString().Trim()); altem.SubItems.Add(myRow[3].ToString().Trim()); altem.SubItems.Add(myRow[4].ToString().Trim()); altem.SubItems.Add(myRow[5].ToString().Trim()); altem.SubItems.Add(myRow[6].ToString().Trim()); altem.SubItems.Add(myRow[7].ToString().Trim()); altem.SubItems.Add(myRow[8].ToString().Trim()); altem.SubItems.Add(myRow[9].ToString().Trim()); altem.SubItems.Add(myRow[10].ToString().Trim()); altem.SubItems.Add(myRow[11].ToString().Trim()); altem.SubItems.Add(myRow[12].ToString().Trim()); altem.SubItems.Add(myRow[13].ToString().Trim()); altem.SubItems.Add(myRow[14].ToString().Trim()); listView1.Items.Add(altem); 提示:i< myTable.Rows.Count;i++) 错误,请指点下,在线等,谢谢

2005-10-24 09:39



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-31163-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.106249 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved