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")
精彩评论