title: ASP.NET - No Datakey on Gridview RowDeleting event!
body: <p>I have a GridView just like this:</p>
  
  <pre><code>&lt;asp:GridView ID="gvwStudents" runat="server" 
      AutoGenerateColumns="False" DataKeyNames="ID"
      ShowHeader="False" onrowdeleting="gvwStudents_RowDeleting"&gt;
      &lt;Columns&gt;
          &lt;asp:BoundField DataField="FirstName" /&gt;
          &lt;asp:BoundField DataField="LastName" /&gt;
          &lt;asp:BoundField DataField="Email" /&gt;
          &lt;asp:CommandField ShowDeleteButton="True" DeleteText="Remove" /&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>Here is how I am creating my DataTable, which the GridView is bound to, so that you know what data I am dealing with:</p>
  
  <pre><code>private DataTable MakeStudentsTable()
  {
      DataTable students = new DataTable();
  
      DataColumn ID = students.Columns.Add("ID", typeof(int));
      ID.AutoIncrement = true;
  
      DataColumn firstName = students.Columns.Add("FirstName", typeof(string));
      DataColumn lastName = students.Columns.Add("LastName", typeof(string));
      DataColumn email = students.Columns.Add("Email", typeof(string));
  
  
      return students;
  }
  </code></pre>
  
  <p>Why, oh, why are there no keys passed in the EventArgs of the RowDeleting event? I need to remove the record from the ADO.NET DataTable that I am keeping in session state when this event is fired.</p>
  
  <p>Why isn't this working? Is it that DataKeys only work when using a DataSource control?</p>