title: Get values from GridView
body: <p>I have a GridView that is populated by a service and I have added a link on each line of this grid so that I may take action when that specific row is clicked.  I want to get some of the items in the selected row but even if I add a onSelectedRowChanged event I am not getting that event to fire, just my link.</p>
  
  <pre><code>&lt;asp:GridView ID="gvTransactionHistory" runat="server" 
      AutoGenerateColumns="false"  
      onselectedindexchanging="gvTransactionHistory_SelectedIndexChanging"&gt;
      &lt;Columns&gt;
          &lt;asp:TemplateField&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="lblAmount" runat="server" Text='&lt;%# Eval("preAuthAmount") %&gt;'&gt;&lt;/asp:Label&gt;
                  &lt;asp:LinkButton runat="server" Text="Assign+" OnClick="btnAssign"&gt;&lt;/asp:LinkButton&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>Here is my btnAssign click event, which works fine...</p>
  
  <pre><code>protected void btnAssign(object sender, EventArgs e)
  {
      Response.Write("Works!");
  }
  </code></pre>
  
  <p>I added this to see if I could trigger this event but I am not really changing index so what I need help with is understanding what event I can tie into that will allow me to click my link button, and get the values from THAT row.</p>
  
  <pre><code>protected void gvTransactionHistory_SelectedIndexChanging(object sender, System.Web.UI.WebControls.GridViewSelectEventArgs e)
  {
      var amount = gvTransactionHistory.SelectedRow.Cells[3].Text;
      Response.Write(amount);
  }
  </code></pre>