There are 2 possible reason for the error :-
1. In The Below Code check if
e.CommandArgument returns Integer
int index = Convert.ToInt32(e.CommandArgument);
2. Check if the
index supplied is not less than 0 or not negative
GridView1.Rows[index].Visible = false;