Add this code in you gridview columns.
Add template field in your gridview.
<asp:TemplateField >
<ItemTemplate>
<asp:Button id="btnEdit" runat="server" Text="Edit" CommandName="Edit" CssClass="btn" CausesValidation="false"/>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField >
----------------------------
In Codebehind
protected void gv_RowEditing(object sender, GridViewEditEventArgs e)
{
Int32 iID = Convert.ToInt32((gv.DataKeys[e.NewEditIndex].Value));
EditMethod(iID)
}
Please write this code in code behind.
You can get Id of editing element. This can fetch data of specific row.
This is final solution.