dataGridView的用法请教

.Net技术 码拜 9年前 (2015-05-10) 1240次浏览 0个评论

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].……都是什么意思呢?
谢谢!

10分
Rows[0][0],Rows[0][1]
rows是行集合,Rows[0]是第一行,Rows[0][0]是第一行第一列,以此类推
5分
Rows[0][1]
表示第0行,第1列
5分
引用 1 楼 bdmh 的回复:

Rows[0][0],Rows[0][1]
rows是行集合,Rows[0]是第一行,Rows[0][0]是第一行第一列,以此类推

就是一个数组


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明dataGridView的用法请教
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!