来自德国的一个美好的下午,
我在行上有一个asp:GridView和ButtonFields,带有RowCommand事件。
protected void gridView_RowCommand(object sender, GridViewCommandEventArgs e)
{
switch (e.CommandName)
{
case "FirstButton":
this.DoSomething();
break;
case "SecondButton":
this.DoSomethingElse();
break;
}
this.BindDataGrid();
}
当我在ButtonField上点击这个事件时,我的问题超过了90%。问题是我执行this.DoSomething()
或this.DoSomethingElse()
之后,特定的行无法执行。
THX
马克
答案 0 :(得分:0)
你为什么要调用this.BindDataGrid?你没有这个解决方案吗?这将导致第二次运行rowcommand。