Can't get values from rows/cells in GridView

前端 未结 3 1389
梦如初夏
梦如初夏 2020-12-21 11:17

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;
}
         


        
3条回答
  •  孤城傲影
    2020-12-21 11:31

    it could depend on many things.. Where is this code fired in relation to when the GridView is populated (Databind() called)?

    Without any context, its hard to say what else it could be.

提交回复
热议问题