How to get the value of hidden column Field on Click of Delete button in GridView. I am trying to get rowindex value first and then column value but getting an error as on below code-
Index was out of range. Must be non-negative and less than the size of the collection.
int rowIndex = e.RowIndex;
GridViewRow row = GridView1.Rows[rowIndex];
Id = (int)GridView1.DataKeys[row.RowIndex].Value;