将autogenerateditbutton 设置为true数据源使用
SqlDataAdapter
DataSet
导入
在.cs文件夹中添加
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
后显示GridView“GridView1”激发了未处理的事件“RowEditing”。但是根据 http://topic.csdn.net/t/20060922/17/5041817.html用导向 设置数据源
并且在高级中勾选 在使用数据源向导创建时候点高级,选中生成Insert,Update,Delete就可以正常使用 求助!
SqlDataAdapter
DataSet
导入
在.cs文件夹中添加
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
后显示GridView“GridView1”激发了未处理的事件“RowEditing”。但是根据 http://topic.csdn.net/t/20060922/17/5041817.html用导向 设置数据源
并且在高级中勾选 在使用数据源向导创建时候点高级,选中生成Insert,Update,Delete就可以正常使用 求助!
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
后显示这句话有问题,不用添加这个的,因为这个是事件,你添加了事件,前台控件就要点相关事件代码,不然会报错。
删了这个句就可以了。
RowEditing 即GridView在点击编辑时激发
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
GridView1.EditIndex = e.NewEditIndex;
GridViewBind();
}
GridView里面有没有配置事件GridView1_RowUpdating
点击GridView 右键属性 然后找那个闪电符号点一下 然后双击 GridView1_RowUpdating这个进去就行了
哈哈 拿个放大镜看看就是在页面上 点击GridView 右键属性 然后找那个闪电符号点一下 小闪电符号! !!!!