Gridview onrowupdating onrowupdated

06 May

event is raised when the Cancel button of a row in edit mode is clicked, but before the row exits edit mode.This enables you to provide an event-handling method that performs a custom routine, such as stopping the cancel operation if it would put the row in an undesired state, whenever this event occurs.I have tried to add an event handler to the Row Updated event of my custom control but it is not called.I have tried to override On Row Updated in my custom control, but the breakpoint never gets hit. Every one can use it to compare the new value with old ones.After searching long and hard I found a great article that solved my issue.

gridview onrowupdating onrowupdated-50

Now you can ask questions directly to me on my new site ASPForums.

Below are some common discussions/resolutions around this issue:: 1.) Since data is bind to gridview at runtime, make sure you bind it as below: Thanks, that solved it.

I've spent the last day trying to figure it out, I have other Grid Views set up the same way in the site and they worked fine without the Data Key Names being specified but I'm guessing it's related to the table used here having no primary key.

A Grid View Cancel Edit Event Args object is passed to the event-handling method, which enables you to determine the index of the current row and to indicate that the cancel operation should be stopped.

event is raised when a row's Update button is clicked, but before the Grid View control updates the row.