I have a gridview displaying data within a template field which requires more information about the record to be displayed by clicking on a linkbutton. Right now, I have the "details" linkbutton display the information by calling the edit command on the gridview so that it switches to the EditItemTemplate. Within the EditItemTemplate I have a linkbutton for cancel and then an edit button that, when clicked, displays the update button with the update command, but I need it to iterate through that row and set all the textboxes within the EditItemTemplate to ReadOnly=false so as to allow them to be edited before the update command is selected. Here is a summary of the code:

```
<ItemTemplate>
    *basic information displayed*
    <asp:LinkButton runat="server" CommandName="Edit" Text="Details"></asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
    *A bunch of readonly textboxes that display the extra information*
    <asp:LinkButton runat="server" CommandName="Update" Text="Update" Visible="false"></asp:LinkButton> 
    <asp:LinkButton runat="server" Text="Edit" OnClick="editButton_Click"></asp:LinkButton>
</EditItemTemplate>

```

And the code for the event which makes the buttons appear the way I want, but I'm not sure how to iterate through the EditItemTemplate, or even if this is what I should do:

```
 Protected Sub editButton_Click(sender As Object, e As EventArgs)
        sender.FindControl("updateButton").Visible = True
        sender.FindControl("editbutton").Visible = False
        For Each t In ?EditItemTemplate?
            Dim textbox = TryCast(t, System.Web.UI.WebControls.TextBox)
            If textbox IsNot Nothing Then
                textbox.ReadOnly = False
            End If
        Next
End Sub

```

So my question is either how to get this to work, or how I should set up the GridViewCommands otherwise