title: ASP.Net GridView GridViewDeleteEventArgs.Keys empty
body: <p>I have following Gridview:</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" CssClass="table" DataKeyNames="groupId"
            DataSource="&lt;%# dsUserGroupsSelected %&gt;" DataMember="Group" etc....&gt;
  </code></pre>
  
  <p>and after firing RowDeleting event handler:</p>
  
  <pre><code>protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
  </code></pre>
  
  <p>e.Keys is empty. Moreover, in runtime if I check</p>
  
  <pre><code>dsUserGroupsSelected.Group.PrimaryKey
  </code></pre>
  
  <p>it is poulated with: </p>
  
  <pre><code>{System.Data.DataColumn[1]}
      [0]: {groupId}
  </code></pre>
  
  <p>so it's really odd to me. Am I missing something? I have this kind of a workaround:</p>
  
  <pre><code>int groupId = (int)GridView1.DataKeys[e.RowIndex].Value;
  </code></pre>
  
  <p>which will work just fine, but I just can't get it why e.Keys (and e.Values) would be empty!? Any ideas?</p>