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 DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlGridView - Get Started in C#GridView - PropertiesGridView - ColumnGridView - RowGridView - CellsGridView - EditorsGridView - Context MenuConditional Custom Context MenuModify Default Context MenuGridView - Populating with DataData BindingBinding to Array and ArrayListBinding to Generic ListBinding to Binding ListBinding to DataTable / DataSetBinding to DataReaderBinding to Sub ObjectsBinding to XMLUnbound ModeUpdate DatabaseGridView - Hierarchical GridGridView - SelectionGridView - ScrollingGridView - SortingGridView - GroupingGridView - FilteringGridView - Expression EditorInsert/ Update/ Delete RecordsGridView - View DefinitionGridView - Exporting DataStyling and AppearanceGridView - LocalizationSave and Load LayoutGridView - Print SupportWinForms ListView UI ControlWinForms Menu UI ControlWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlWinForms Property Grid UI ControlWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |