• λ我爱Aspx >> Asp.Net >> DataGrid 模板绑定数据,更新后DataGrid控件还处于编辑状态.
  • DataGrid 模板绑定数据,更新后DataGrid控件还处于编辑状态.

  • :aspxer  Դ:csdn  :2007-7-6 2:43:56  ؼ:数据
  • DataGrid 绑定数据更新后,还是编辑状态,模版列绑定了多个TextBox控件,更新不能返回,但是数据是更新了,DataGrid控件还处于编辑状态.

    google_ad_width = 250; google_ad_height = 250; google_ad_format = "250x250_as"; google_color_url = "000000";

    代码如下:

    protected void Page_Load(object sender, EventArgs e)

    {

    if (!IsPostBack)

    {

    Bindgrid();

    }

    }

    public void Bindgrid()

    {

    UserManager um = new UserManager();

    string strSqlUserInfo = "Select * from UserInfo";

    DataSet ds = um.GetUserInfo(strSqlUserInfo);

    if (ds != null)

    {

    gvwAuditUser.DataSource = ds;

    gvwAuditUser.DataBind();

    }

    }

    protected void dgd_Update(object sender, DataGridCommandEventArgs e)

    {

    UserInfo u = new UserInfo();

    int i = e.Item.ItemIndex;

    int UserID = int.Parse(gvwAuditUser.DataKeys[i].ToString());

    Ҷƪл˵?
  • һƪ模拟onclick事件执行。。。
    һƪ急!!!!asp.net中弹出提示窗体问题