That is event bubbling and you can get more info about that here.
If you have a Template Field like this
<asp:Button ID="button1" runat="server" Text="Submit" CommandName="Select"
when you click the button, button OnClick event fires and then SelectedIndexChanged (as command name was set to Select) and finally row Command Event.
protected void btnSubmit_Click(object sender, EventArgs e)
//Button Click event
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
//GridView Selected Index Changed event
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
//Get the row clicked
int rowIndex = Convert.ToInt32(e.CommandArgument);
So, make sure that you are using only Row Command event by setting CommandName to something else other than Select. You do not need that button click event also.