{ ListViewItem lvi = new ListViewItem();//新增一个ListViewItem lvi.SubItems[0].Text = dr["Node"].ToString();//第一列值 lvi.SubItems.Add(dr["Weights"].ToString());//第二列值 this.listView1.Items.Add(lvi);//将新增列加入ListView }
{ ListViewItem lvi = new ListViewItem();//新增一个ListViewItem lvi.SubItems[0].Text = dr["Node"].ToString();//第一列值 lvi.SubItems.Add(dr["Weights"].ToString());//第二列值 this.listView1.Items.Add(lvi);//将新增列加入ListView }