title: How to get the selected row index and that selected row's cell value using delete button
body: <p>I have use the templete field delete button in gridview, so when I click on any delete button in the gridview to delete a row at that time it will give the deleting row index with that selected row's <code>cells[0]</code> value. How can I do any one have a idea....? </p>
  
  <pre><code>protected void GridView3_RowCommand(object sender, GridViewCommandEventArgs e)
  {
          int index = Convert.ToInt32(e.CommandArgument);
          int grdid = Int32.Parse(GridView3.Rows[index].Cells[0].Text);
  
          IndiesProductDataContext ip = new IndiesProductDataContext();
          ip.iLinks.DeleteAllOnSubmit(ip.iLinks.Where(c =&gt; c.ProductID == grdid));
          ip.SubmitChanges();
  }
  </code></pre>
  
  <p>I am using row command in gridview deleting row geting index but it does not work</p>