Protected void gridview rowupdating object sender gridviewupdateeventargs e

I confirmed this using Reflector: protected virtual void On Row Updating(Grid View Update Event Args e) { bool flag1 = base.

Is Bound Using Data Source ID; Grid View Update Event Handler handler1 = (Grid View Update Event Handler) base.

Each template columns Item Template field contains Label Control & Edit Template contains Text Box control for Editing item.

Set the Binding Field name to the Text Property of both controls for each template field to the respective Database Column Name i.e Eval(“Emp Name”).

Uncheck Auto-Generate Field from the Property window.

Add three Template Field Column for Employee Name, Designation, & Delete Button.

Set the Data Key Names property of Grid View to Primary Key Column of Data Base i.e. This property binds the database column field value to each row of gridview as a Unique Identifier.

Set the data bindings for Delete Button for Command Argument Eval(“Emp Id”); for saving the ID column value from database for fetching the ID field value while Deleting the Record.

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.

Table Name- Employees Fields- Emp Id, Emp Name, Designation Take Grid View control on page and set the ID property to dg Employees.

Tags: , ,