Just change the "CommandName" property of the "Edit" button from "Edit" to "EditRow"(or something else which is relevent to you but make sure it is not "Edit"). Now surprisingly the code works fine.
Some other GridViews reserved key words and their default associated events are as follow :
"Cancel" - Raises the RowCancelingEdit event.
"Delete" - Raises the RowDeleting and RowDeleted events.
"Edit" - Raises the RowEditing events.
"Page" - Raises the PageIndexChanging and PageIndexChanged events.
"Select" - Raises the SelectedIndexChanging and SelectedIndexChanged events.
"Sort" - Raises the Sorting and Sorted events.
"Update" - Raises the RowUpdating and RowUpdated events.