更新时间:2021-08-01 02:46:22
我认为正确的方法是
I think the right way to go is
foreach (GridviewRow row in gvFormula.Rows)
{
//should you have a TextBox called txt1
((TextBox)row.FindControl("txt1")).ReadOnly = true;
//or if you need invisible
((TextBox)row.FindControl("txt1")).Visible = false;
//and so on and so on...
}
如果需要,你也可以在RowDataBound事件上使用
You can also use it on RowDataBound event if you need