But I need to check to see if the update failed in the on Updated event handler, and it doesn't have e. So I need to know how to get a Grid View row to remain in edit mode if the update fails. Are you using some kind of database validation(f.e.
When the user clicks the Update link button the grid's Row Command Event fires.
You can also indicate whether the exception was handled in the event-handling method by setting the On Row Updated Row Canceling Edit On Row Canceling Edit Row Deleted On Row Deleted Row Deleting On Row Deleting Row Editing On Row Editing Row Updating On Row Updating Grid View Class System.
NET Architecture MVP (Microsoft Most Valuable Professional) works as an Architect Consultant and provides consultancy on how to design and develop Web applications.For a list of the supported versions, see System Requirements. Row Canceling Edit Event On Row Canceling Edit Grid View. NET Grid View Tips and Tricks series, this post shows how to cancel the Update and Delete operation in an ASP. To cancel an update and delete operation, we will make use of the Row Updating and Row Deleting events.I am using Template Field’s Item Template and Edit Item Template for providing read only and editing interface of the same column in the Grid View.By Default, Grid View control displays Item Template which directly shows the Product Name and Unit Price columns but when user clicks Edit button Grid View automatically switches to Edit Item Template and display the control available inside Edit Item Template for user editing.Editing the Grid View control can be an incredibly easy feature to add for certain database tables, especially those who have no foreign key associated and can easily be edited through the use of a standard Text Box web control as shown in the figure below: 1.