📜  在 asp.net 文本框大小中编辑更新删除 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:12.630000             🧑  作者: Mango

代码示例1
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;
            }
        }