i've used it here is the code use it as per your requirement
protected void Button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < GridView1.Rows.Count; i++)
{
TextBox tb1 = GridView1.Rows["row index"].FindControl("Textbox1") as TextBox;
UpdateFunction(tb1.Text);
}
}