Updating in gridview

Then I have several methods attached with following events Get video of hundreds of ASP. On Row Editing - Edit Record On Row Cancel Edit - Cancel Record On Row Updating - Update Record On Row Deleting - Delete Record As I set Auto Generate Columns property to false so I am going to manually write the fields name that I need to appear in the way I want.

updating in gridview-5

Each column represents a field, while each row represents a record.

The Grid View control supports the following features:use Row Editing, Row Updating, Row Deleting, Row Command, Row Data Bound, Row Canceling Edit, and Pagination in a Data Grid.

Now let’s start with putting the Grid View on page. Data Key Names="Auto ID" Auto Generate Edit Button="True" On Row Editing="Edit Record" On Row Canceling Edit="Cancel Record" On Row Updating="Update Record" Cell Padding="4" Header Style-Horizontal Align="left" On Row Deleting="Delete Record" Row Style-Vertical Align="Top" Fore Color="#333333" Grid Lines="None" In the above code, I have kept Auto Generate Columns as false so that Grid View will not render all the fields of the data source automatically.

I have specified Data Key Names as Auto ID, the primary key of the database table.

For demonstration I have created a database (named Database.mdf) in which we have a table named tbl_Employee.

Last modified 14-Oct-2019 08:34