当前位置: 代码迷 >> C# >> dataGridView的用法请问
  详细解决方案

dataGridView的用法请问

热度:51   发布时间:2016-05-05 03:59:20.0
dataGridView的用法请教
MyDS_Grid = MyDataClass.getDataSet("select ID,Name,Sex,Phone,Handset,WordPhone,QQ,E_Mail from tb_AddressBook where ID='" + ModuleClass.MyModule.Address_ID + "'", "tb_AddressBook");
                Address_ID = MyDS_Grid.Tables[0].Rows[0][0].ToString();
                this.Address_1.Text = MyDS_Grid.Tables[0].Rows[0][1].ToString();
        this.Address_2.Text = MyDS_Grid.Tables[0].Rows[0][2].ToString();
        this.Address_3.Text = MyDS_Grid.Tables[0].Rows[0][3].ToString();/
                this.Address_4.Text = MyDS_Grid.Tables[0].Rows[0][4].ToString();
                this.Address_5.Text = MyDS_Grid.Tables[0].Rows[0][5].ToString();
                this.Address_6.Text = MyDS_Grid.Tables[0].Rows[0][6].ToString();
                this.Address_7.Text = MyDS_Grid.Tables[0].Rows[0][7].ToString();
请问这段代码中,Rows[0][0],Rows[0][1].……都是什么意思呢?
谢谢!
------解决思路----------------------
Rows[0][0],Rows[0][1]
rows是行集合,Rows[0]是第一行,Rows[0][0]是第一行第一列,以此类推
------解决思路----------------------
Rows[0][1]
表示第0行,第1列
------解决思路----------------------
引用:
Rows[0][0],Rows[0][1]
rows是行集合,Rows[0]是第一行,Rows[0][0]是第一行第一列,以此类推


就是一个数组
  相关解决方案