就是GridViewRowEventArgs参数的Row,他是GridView当前在操作的整行,所有东东都可以从这里面取
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowState.ToString().IndexOf("Edit") != -1)
{
//Response.Write("<br>" + e.Row.RowIndex.ToString() + ":" + e.Row.RowState.ToString());
//Response.Write("<br>总行数:" + GridView1.Rows.Count.ToString());
//Alternate, Edit或者Edit
TextBox mytb = new TextBox();
mytb = (TextBox)e.Row.FindControl("TextBox8");
if (mytb != null)
{
mytb.Text = DateTime.Now.ToString("yyyy-MM-dd");
}
}
}