In the SelectedIndexChanged event of my page I use code to grab information the selected row, store it in a session and present the data in textboxes below the grid:
For Each item As GridDataItem In MyGrid.SelectedItems
Dim sCode As String = Trim(item("sCode").Text.ToString())
Session("sCode") = sValidationId
txtCode.Text = Session("sCode")
I'd like to be able to have the first set of data already loaded into the textboxes once the page is loaded, so the user does not need to make a selection to fill the textboxes on load.
As the title states, how can I have the first row of my grid already selected when the page loads?