Asp net gridview onrowupdating not firing

I tend to use business objects in my applications so using the standard data controls doesn't work very well, nor would it really buy much in terms of abstraction.In my code I tend to write the databinding logic as part of the page logic which usually is just a couple of lines of code.This works as expected and I can put a breakpoint in the Row Command event handler to see the "Event" command name.After it has been clicked the postback places that row in edit mode. At this point in time the above Edit Item Template is displayed with two Image Buttons within it.event is raised when a row's Update button is clicked, but before the Grid View control updates the row.This enables you to provide an event-handling method that performs a custom routine, such as canceling the update operation, 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.

asp net gridview onrowupdating not firing-58

To cancel the update operation, set the collections, if necessary, before the values are passed to the data source.

Sorry i know i'm posting a lot of comments on my own question.

Storing datatable in View State is not a good practice as it increases the size of your page and reduces the performance, also View State can be deciphered on the client side, so the Data Table is not secure.

This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. By joining today you can post your own programming questions, respond to other developers questions, and eliminate the ads that are displayed to guests. Hi All I am creating a Datagrid on the fly, which works fine, added a edit,cancel update command field as a template field.

However wen I click on Update nothin happens, currently it isn't connected to the database I just want it to change the text of a button so I know the update works.