<p>I have a datalist with a OnDeleteCommand="Delete_Command".</p>

<p>I want the delete a record with multiple primary Keys but I do not know how to access it from the Delete_Command event.</p>

<p>If I use DataKeyField I'm limited to only one key.
Any workarounds for this?</p>

You can access all of the keys:
```
```
gridView.DataKeys[rowNum][dataKeyName]
```
```
where rowNum is e.RowIndex from the gridView_RowDeleting event handler, and dataKeyName is the key you want to get:
```
```
<asp:GridView ID="gridView" runat="server" DataKeyNames="userid, id1, id2, id3" OnRowDeleting="gridView_RowDeleting">

protected void gridView_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
    gridView.DataKeys[e.RowIndex]["userid"]...
    gridView.DataKeys[e.RowIndex]["id1"]...
    gridView.DataKeys[e.RowIndex]["id2"]...
    gridView.DataKeys[e.RowIndex]["id3"]...
}
```
```