Hi Martin,
Thank you for using Syncfusion controls.
By default, when the cell leaves from editing it will automatically update the view of grid alone to refresh the changes. It will affect only the view properties of the grid and will not update the changes to the underlying source file.
You could update your underlying data source file manually. To update the changes of the Data Source (grid level changes) to the underlying source file when the cell leaves from editing, you can end editing of cell update the cell or data changes by using SfDataGrid.CurrentCellEndEdit event. Please refer the below code snippet,
|
sfDataGrid1.CurrentCellEndEdit += SfDataGrid1_CurrentCellEndEdit;
private void SfDataGrid1_CurrentCellEndEdit(object sender, Syncfusion.WinForms.DataGrid.Events.CurrentCellEndEditEventArgs e)
{
//You can add your codes here to save the data or cell changes.
} |
You could update the database of added or deleted row by using SfDataGrid.View.Records.CollectionChanged event. Please refer the below code snippet,
|
sfDataGrid1.View.Records.CollectionChanged += Records_CollectionChanged;
private void Records_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
{
//You can add your codes here to save the added or delete row data changes.
} |
We hope this helps. Please let us know, if you require further assistance on this.
Regards,
Vijayarasan S