现在我想通过点击按钮在DATAGRID中增加一新行来输入数据,下面是我的代码,但是为什么每次都只能添加一条新记录,我想让它点一次按钮就添加一条记录该怎么办
string dbstring=System.Configuration.ConfigurationSettings.AppSettings["ConnectString"];
SqlConnection conn=new SqlConnection(dbstring);
conn.Open();
string sql="select operID,typeID,name from OurPerson where proID='00000000'";
SqlDataAdapter da=new SqlDataAdapter(sql,conn);
DataSet ds=new DataSet();
da.Fill(ds);
DataRow row=ds.Tables[0].NewRow();

ds.Tables[0].Rows.Add(row);
//ds.AcceptChanges();

DataGrid1.DataSource=ds.Tables[0];
DataGrid1.DataBind();
//this.DataGrid1.CurrentPageIndex=this.DataGrid1.PageCount-1;
this.DataGrid1.EditItemIndex=ds.Tables[0].Rows.Count-1;
Page.Response.Write(ds.Tables[0].Rows.Count.ToString());
this.DataGrid1.DataBind();