I have a Grid View control and use old style manual binding with a Data Source property and invoke the Data Bind() method. If you don't use one of the Data Source controls, you are required to handle the Row Updating event. Bipin Joshi is a software consultant, an author and a yoga mentor having 22 years of experience in software development. Having embraced the Yoga way of life he also teaches Meditation and Mindfulness to interested individuals. A friend asked me to help him out on this and frankly it has me completely stumped as well. There are also two events associated with this that you can use � Row Updating and Row Updated. in the absence of batch update, both of these events are raised for each and every row being updated.For example, if we are updating 100 rows, both of these rows are raised for 100 times.
In my case this was happening because I was binding to a List of custom objects.NET Grid View markup and associated code lets first enumerate the important code pieces of this tutorial.In the above code, I set two properties Show Edit Button and Show Cancel Button of Command Field.Finally, we set the Update Batch Size property of the Sql Data Adapter to 10 indicating that we want to update 10 rows as a batch.If you run this application you will notice that the variable updating holds the value equal to the number of rows in the table because this event is raised each time a row is being updated.On the other hand the variable update will hold value equal to (number of rows in the table) / (batch size). NET 2.0, the Data Adapter provides a property called Update Batch Size which allows you to execute queries in a batch.