The error is exactly what the message says:
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index.
If it occurs on this line:
index = (int)grdRpt.DataKeys[gvrow.RowIndex].Value;
then
gvrow.RowIndex
is either negative, or too big for the DataKeys collection. Use the debugger to find out what the actual value is, and what the size of the collection is. Then you can start working out why it's the value it is...
We can't do that for you: we don't have access to your data, and can't run your code under the same conditions you can.