19
Answers

How to find a cell value from ASP.Net gridview

Anele Ngqandu

Anele Ngqandu

11y
18.6k
1
Am trying to get cell value from a columm and am geting the error below:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index


This is my code but am not sure about it and i cant call the column by name it does not allow me to do that.

protected void btnSearchEmployees_Click(object sender, EventArgs e)
{ string n = grdAvailableStuff.Rows[2].RowIndex.ToString();
MessageBox.Show(n);
}

Answers (19)