|
楼主 |
发表于 2020-7-2 20:15:01
|
显示全部楼层
我的原码为:
SqlConnection con = DB.createConnection();
SqlDataAdapter sda = new SqlDataAdapter();
sda.SelectCommand = new SqlCommand("select * from memo",con);
DataSet ds = new DataSet();
sda.Fill(ds, "memo");
GridView1.DataKeyNames = new string[] { "memoID" };
GridView1.DataSource = ds.Tables["memo"];
GridView1.DataBind();
GridViewRow row = new GridViewRow();
给指点一下吧。 |
|