Liveasianchat - Difference between rowupdated and rowupdating of gridview in asp net
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.
event is raised when a row's Update button is clicked, but before the Grid View control updates the row.
A Grid View Update Event Args object is passed to the event-handling method, which enables you to determine the index of the current row and to indicate that the update operation should be canceled.
To cancel the update operation, set the collections, if necessary, before the values are passed to the data source.
If you are working in a designer, such as Microsoft Visual Studio, you can take advantage of designer features built into the Grid View control.
The Grid View control includes support for a smart tag panel that provides a convenient interface for performing common tasks, such as setting properties and launching template editing.
This example shows how to edit and update records in a Grid View in ASP. This example is helpful in situations where an administrator needs to edit several records from the database.
For demonstration I have created a database (named Database.mdf) in which we have a table named tbl_Employee.
This enables you to provide an event-handling method that performs a custom routine, such as checking the results of the update operation, whenever this event occurs.
Raising an event invokes the event handler through a delegate.
A common way to use these collections is to HTML-encode the values supplied by the user before they are stored in the data source.
event is raised when a row's Update button is clicked, but after the Grid View control updates the row.
property can be used to set styles and the position of the pager.