Hi johan,
You need to specify RowEditing event by adding an empty event.
protected void OnRowEditing(object sender, GridViewEditEventArgs e)
{
}
If you are using RowCommand for editing then change the CommandName property of the Edit button from Edit to EditRow (or something else which is relevant to you but make sure it is not Edit).
If this will not resolve your issue please share your complete code and html.