title: Get value of GridView Cell in RowCommand
body: <p>I need to get the value of a cell from the RowCommand event, but the value is not in the PrimaryKeyNames parameter of the GridView.</p>
  
  <p>Currently I have:</p>
  
  <pre><code>if (e.CommandName == "DeleteBanner")
          {
              GridViewRow row = gvCurrentPubBanner.SelectedRow;
              string BannerName = row.Cells[1].Text;
  </code></pre>
  
  <p>This doesn't work (index out of range error), I've also tried:</p>
  
  <pre><code>    int index = Convert.ToInt32(e.CommandArgument);
  GridViewRow row = gvCurrentBanners.Rows[index];
  </code></pre>
  
  <p>This doesn't work either as the CommandArgument (the banner ID) is not the row ID.</p>