DataTable tblDatas = new DataTable("Student");
DataColumn dc = null;
dc = tblDatas.Columns.Add("ID", Type.GetType("System.Int32"));
dc.AutoIncrement = true;//自动增加
dc.AutoIncrementSeed = 1;//起始为1
dc.AutoIncrementStep = 1;//步长为1
dc.AllowDBNull = false;//
dc = tblDatas.Columns.Add("id", Type.GetType("System.String"));
dc = tblDatas.Columns.Add("stuname", Type.GetType("System.String"));
dc = tblDatas.Columns.Add("agscore", Type.GetType("System.String"));
dc = tblDatas.Columns.Add("classid", Type.GetType("System.String"));
DataRow newRow;
newRow = tblDatas.NewRow();
newRow["id"] = "5";
newRow["stuname"] = "水果";
newRow["agscore"] = "99";
newRow["classid"] = "3";
tblDatas.Rows.Add(newRow);
this.GridView1.DataSource = tblDatas;
这个应该怎么新增数据啊~~而且我想新增空白数据,然后在网页上输入的那一种
大大们 给个思路也行。。。。想一下午了