$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
DataGridView WinForms Control
Powerful GridView C#.NET control supports data binding to various data sources
Home > WinForms UI Controls > User Manual > Update Database in C#

GridView DataBase Updating with ADO.NET

The DataBase Updating with ADO.NET support meets the different requirements of workflow and the specifications of the various applications. It allows users updating the data base while the end user is up to exit the applications, or click a special button. Moreover, when developers need update the data base as the end user finishing the changes to a single value of Kettic GridView, they can implement the data base updating with ADO.NET by handling the events of KetticGridView or the BindingSource.

How to Update DataBase in C#

The following are the demonstrations that show how to update data base with ADO.NET in a C#.NET project. In the example below, we use an ADO.NET DataTable which have loaded data from a SqlDataAdapter and is bound to a BindingSource component to Kettic GridView control.

Update Database when Changing Current Row

In this example, we are going through the way of updating database while end users modifying the current row to GridView control. We are going to use the BindingSource ChangedCurrentItem event to commit the data to the database and an additional member to save the last edited row instance. The following are the C# code for accomplishing this.

Update Database on Grid Rows Added, Deleted or Changed

The GridView control is capable of updating database on grid rows which are added, deleted, or changed currently. The following is an example that shows how to update the database when the end user deletes a grid row. We will handle the events, DeletingRowbyUser and DeletedRowsbyUser, which will be fired only once even if users select and delete more than one row at once.

Update Database when Adding a New Row

When the end users add a new row to the grid, the GridView is able to update the database too. This is accomplished by handling the AddedRowby User event. Both the ChangedCurrentItem event and the ChangedCurrentRow event are able to update the database when changing the current row.

Update Database when Changing a Cell

The Kettic DataGridView provides the ChangedCellValue event for developers to update Database immediately when end users edit a cell, but modifying the current row.
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls