The GridView ' ' fired event RowUpdating which wasn't handled. C# code behind asp.net

后端 未结 2 1050
名媛妹妹
名媛妹妹 2021-01-23 07:51

There are similar questions on Stackoverflow and other websites, but I seem to miss something.

I have a GridView bound to a DataTable which comes from a database. My goa

2条回答
  •  旧巷少年郎
    2021-01-23 08:17

    GridView's in ASP.NET have some built in commands - Deleted, Update, etc. What's happening is that your button has a command name of Update, and the Gridview is hijacking that from you and firing a RowUpdating event instead of your RowEditing event. Change your button command name to be Edit, and use a RowEditing event.

提交回复
热议问题