I’m trying get values from a GridView using the following code:
foreach (GridViewRow row in this.dgvEstudios.Rows) { var xy = row.Cells[1].Text; }
Always get a an empty string ('') as the value returned from .Text, why does this happen? I have set EnableViewState to true
The cell might have controls inside it (e.g. LiteralControl or an HyperLink). This is what you should be looking for.
row.Cells[1].Controlscollection, you should look for.