How to update the Database while performing CRUD Operation You can update the changes to the database that are done in Grid using the following events.
You can use C# or VB code to perform CRUD operations with Grid as follows. Here, SQL query is used to update the database. You can perform update, insert and delete operation in the Grid. While performing these operations, the corresponding event is invoked. In that event SQL query is used to update the database. Steps to update the database:
Step - 1 Declaring Events The events for performing CRUD operation are declared. Refer the following code example in C# and VB to declare the events. C#
VB
Step-2 Define an Event SQL queries are used to update the database that is used inside these events. In the RowAdding event, insert query is used to add a new record to the database. Update query is used in RowUpdate event to update the existing record in the database. In the RowDeleting event, Delete query is used to remove the selected record from the database. Please refer the following C# and VB code example to update the changed data in the database. C#
VB |
This page will automatically be redirected to the sign-in page in 10 seconds.