get data from gridview without querying database
- by frank2009
Hi there
I am new at this so please bear with me...
I have managed to get the following code to work...so when I click on the "select" link in each row of the gridview, the data is transfered to other label/textbox on the webpage.
So far so good, the thing is that everytime I click on select...it goes and checks on the database for the data and there is a delay of a few seconds...
I was hoping that the data, since it is already visible on the gridrows, is simply "picked up" and used on other labels/textboxes...without requerying the database.
Is this possible ?
Thanks in advance
Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Label1.Text = GridView2.SelectedRow.Cells(8).Text
Label2.Text = GridView2.SelectedRow.Cells(9).Text
TextBox1.Text = GridView2.SelectedRow.Cells(7).Text
End Sub