获取GRIDVIEW模板列中的控件所在的行

protected void TextBox1_TextChanged(object sender, EventArgs e)
{
   TextBox txt
= sender as TextBox ;
  
int index = (txt .NamingContainer as GridViewRow).RowIndex;
}

原文地址:https://www.cnblogs.com/msnadair/p/1702937.html