I came across a very interesting error while using buttons/link buttons in the Grid View for editing the Grid View rows data.
The exact situation I faced is like this – I have a Grid View with a column which contains an edit button.
NET forums is how to deal with exceptions like The Grid View 'Grid View1' fired event Row Editing which wasn't handled.
The HTML code for the Grid View is as follow : Till now everything looks fine but the problem arises when you run this application.
When we edit a row in our Grid View and press the “Update” button, at some time it’s received in the Row Updating method.
But as I noted in the comments in that method, some collections that should contain the columns (names, old values and new values) are always empty. And the Row Updated method is never even touched!!! NET Forums that I need to use a Data Source control.
Unfortunately the Data List, unlike the Gridview, does not have all the features such as paging and sorting that are commonly required.
So if you still need or want to use the Grid View, but also need more control on the way that the table is rendered, you can use the Grid View events and properties.
The button is associated with the Command Name property as “Edit”.
The Grid View is associated with the On Row Command event.
For a while now I’m trying to figure out why my method, triggered by the Grid View.
Row Updating event, doesn’t work as all samples say it should do.
NET 2.0 most of the examples and tutorials deal with setting the Data Source ID, which buys you a lot of automation that you may not even appreciate unless you’ve done this the old fashioned way.