📅  最后修改于: 2022-03-11 14:49:12.630000             🧑  作者: Mango
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if ((e.Row.RowState & DataControlRowState.Edit) > 0)
{
TextBox tb = (TextBox)e.Row.Cells[5].Controls[0];
tb.Width = 40;
TextBox tb1 = (TextBox)e.Row.Cells[6].Controls[0];
tb1.Width = 60;
TextBox tb2 = (TextBox)e.Row.Cells[7].Controls[0];
tb2.Width = 60;
}
}