0

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;
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103

0 Answers0