Rowdeleted and rowupdating
This is becoming so frustrating it's getting almost comical. Breakpoints were triggered for the Row Editing and Row Command. David I suggested that the Row Updating function was being blocked by the . Data Bind() in the Row Command event so that only the Edit command will activate it (take it out of Row Editing). Twice for Row Command (1 for Row Editing and 1 for Row Canceling) and once for Row Editing. I am going to try and create this not as a web application but rather as a website and see if I notice any differences. The Grid Data Item class here is implemented specially for this local data source.
I also don't understand when I select the grid View control and look at the events in the Properties window of Visual Studio 2010 why I see all the proper event procedures listed for each event I expect to use. Data Bind in the Row Command when the Edit Command is invoked and removed it from Row Editing. The code works as I intended it to (and is listed below).
Here’s the code to cancel update and delete in a Grid View: Suprotim Agarwal, Developer Technologies MVP (Microsoft Most Valuable Professional) is the founder and contributor for Dev Curry, Dot Net Curry and SQLServer Curry.
He is the Chief Editor of a Developer Magazine called DNC Magazine.
The events are as described below: Row Updating - Occurs when a row's Update button is clicked, but before the Grid View control updates the row.
Row Deleting – Occurs when a row's Delete button is clicked, but before the Grid View control deletes the row.