I've been pulling my hair out for hours, so hoping someone can point me in the right direction. I cannot seem to find how to reference the text value of a cell of a selected row in a gridview using VB. Here is what I've attempted so far:
Below is what I have in code behind, which runs without error but when I click the GridView's edit it returns a null value. I thought this to be a binding issue so I setup a binding method for the gridview so I could manually bind before or after returning the column value, but where ever I placed the binding method it always returned a null value.
Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing
Dim MyCellValue As String
MyCellValue = GridView1.Rows(e.NewEditIndex).Cells(1).Text
'Textbox used to display contents of selected gridview column
MyTextBox.Text = MyCellValue