The error is pretty self explanatory:
Index was out of range. Must be non-negative and less than the size of the collection.
In that code you are using just one index:
int sr = Convert.ToInt32(GridView1.DataKeys[e.RowIndex].Value);
So
e.RowIndex
is either negative or bigger than the DataKeys collection.
So check that you have the DataKeyNames property set, and use the debugger to find out what the index value is, and how big the collection is.
We can't do that for you: we can't run your code, and don't have access to your data!