请问GridView 绑定数据后
在GridView最后加一行
代码发出来

解决方案 »

  1.   

    直接加<tr>...</tr>不行?
      

  2.   

    GridView1.ShowFooter = true;
    在FooterRow中加数据!
      

  3.   

    自己看,老掉牙的asp.net2.0教程(那个时候asp.net ajax还没有发布):
    http://blog.csdn.net/heker2007/archive/2007/04/01/1548229.aspx人家连录入界面都可以加,更简单的东西自然不自话下。
      

  4.   


    +1我正在使用《Csdn收音机》第一时间获取最新动态!
      

  5.   

    DataRow dr=ds.Tables[0].NewRow();
    dr[0]=0;
    dr[1]="";
    ds.Tables[0].Rows.InsertAt(dr,0);
    GridViewProductsList.DataSource = ds;
    GridViewProductsList.DataBind();或
    IList<Product> lst;
    Product p= new Product();
    p.ProductID=0;
    p.ProductName="";
    lst.Add(p);
    gv_PrcsProp.EditIndex = lst.Count - 1;
    this.GridViewProductsList.DataSource = lst;
    this.GridViewProductsList.DataBind();
      protected void GridViewProductsList_RowUpdating(object sender, GridViewUpdateEventArgs e)
      {
      GridViewProductsList.EditIndex = e.RowIndex;
      int id = int.Parse(GridViewProductsList.DataKeys[e.RowIndex].Value.ToString());
      //添加数据
      GridViewProductsList.EditIndex = -1;
      BindData();
      } http://www.cnblogs.com/chenbg2001/archive/2009/06/16/1504590.html