开发者

ASP.NET GridView how to cancel update

I have GridView with connected SqlDataSource and开发者_如何学编程 I want cancel updating row when my condition is false in OnRowUpdating event? How to do it? Thank you.


try

protected void Page_Load(object sender, EventArgs e)
    {
        GridView1.RowUpdating += new GridViewUpdateEventHandler(GridView1_RowUpdating);
    }

    void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {
          e.Cancel = true;
    }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜