1、取值示例
for(int i=0;i<this.myGridView.Rows.Count;i++)
{
TextBox txt = (TextBox)this.myGridView.Rows[i].Cells[0].FindControl("txtName");
if(txt != null)
{
string str = txt.Text;
MessageBox.show(str);
}
}
2、赋值示例
for(int i=0;i<this.myGridView.Rows.Count;i++)
{
TextBox txt = (TextBox)this.myGridView.Rows[i].Cells[0].FindControl("txtName");
if(txt != null)
{
txt.Text = "NewValue";
}
}