I have the following GridView, with a button column:
I'm trying to get the value of the first databound column once the user clicks the button into my "Name.txt" label.
I'm using the following:
I've been playing around with this and cannot figure out how to evaluate the given row in the GridView when the user clicks the button column of that row.
Could anyone suggest a place to start?
Joe
Code:
<asp:GridView ID="GridView1" runat="server" DataSourceID="ObligorSearchResultsDataSource"
<Columns>
<asp:ButtonField ButtonType="Button" CommandName="GetDetails" Text="Details" />
</Columns>
</asp:GridView>
I'm trying to get the value of the first databound column once the user clicks the button into my "Name.txt" label.
I'm using the following:
Code:
Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
If e.CommandName = "GetDetails" Then
Name.Text = ?????
End If
End Sub
I've been playing around with this and cannot figure out how to evaluate the given row in the GridView when the user clicks the button column of that row.
Could anyone suggest a place to start?
Joe