开发者

Grid view in VB.NET

开发者 https://www.devze.com 2022-12-13 17:44 出处:网络
How can I retrieve data from a gridview to text box in VB.NET? I want to select the first row of values (suppose that it contains:rollno and name) and to display it in textbox1 and textbox2. That is,

How can I retrieve data from a gridview to text box in VB.NET? I want to select the first row of values (suppose that it contains:rollno and name) and to display it in textbox1 and textbox2. That is, I want to display t开发者_如何学编程he values of selected rows.


You can try something like this

Dim d As DataTable
d = DataGridView1.DataSource
TextBox1.Text = d.Rows(0)("rollno")
0

精彩评论

暂无评论...
验证码 换一张
取 消