Rowupdating event in asp net

Unfortunately I didn’t think of it as affecting events too. In my case most features worked, Edit buttons would invoke row editing mode, cancel button works fine, row Command event generally worked, but it was Row Updating that simply wasn’t working. A couple of days ago I mentioned a project that I’ve been working on that is a bit out of the ordinary as far as Grid Views go.

I have set the requisite attributes in the Grid View tag.

The secret lies in the event handlers–in this case, the Row Updating event handler. Grid View Update Event Args object that is passed in. This page contains copyright material from //blog.and you have no rights to copy and paste the full text into your own blog even if you have written permission to the contrary.

Using the Row Updating handler, we can do whatever we want. What the line of code says is “cancel any other update processing that may have happened after this event gets called.” From here on out, you’ll need to retrieve the values from your edit controls manually using the Find Contro By ID() method I demonstrated on Monday and updating the database using code. – For a while now I’m trying to figure out why my method, triggered by the Grid View.

Within the Item Template I have an Image Buttong with a Command Name of "Edit".

This works as expected and I can put a breakpoint in the Row Command event handler to see the "Event" command name.

Leave a Reply