Can't Find Controls in GridView on Dynamic Controls

前端 未结 2 374
情书的邮戳
情书的邮戳 2021-01-28 19:45

I have a gridview where I add textboxes to everycell on runtime. However, I can\'t seem to access those controls using findcontrol

Here is how I add the tex

2条回答
  •  广开言路
    2021-01-28 20:09

    Use FindControl within the Cell of the Row that you added the Control:

    GridView1.Rows(0).Cells(cellindex).FindControl("txtSchedule" & cellindex.ToString)
    

提交回复
热议问题