Sqldatasource updating event not firing
You have to make sure that you aren't setting your Grid View's data when it is not postback.
If you do this, your Grid View's source will be refreshed before you're able to grab the new values out of it.
If you are using command buttons, then do not use Auto Generate Edit Button.
First, I load up some data: After that, I’m doing some work to make my Grid View look beautifull, adding all columns by hand.
But for this demo, I’ll show you the simple version, that also doesn’t work 🙂Let’s bind the data to our Grid View and have it autogenerate our columns, as well as an edit button.
NET 2.0 introduced a number of new Web controls designed for accessing and modifying data. NET 2.0's data source controls make it possible to retrieve, insert, update, and delete data without having to write the tedious dedata access code that was so commonplace in ASP. Previous installments of this article series have looked at returning, inserting, and deleting data using the Sql Data Source control. These controls can work in unison with the data source controls to facilitate inserting, updating, and deleting data.
These controls allow page developers to declaratively access and modify data without writing any code to perform the data access. In this article we will examine basics of using the Sql Data Source and Grid View controls to update records from a database.