DataNavigatorCommitChanges Method

This is used to manually commit pending changes to the current row in the data source

Definition

Namespace: EWSoftware.ListControls
Assembly: EWSoftware.ListControls (in EWSoftware.ListControls.dll) Version: 2023.4.9.0
public void CommitChanges()

Remarks

This will call the EndCurrentEdit method for the data source in the current binding context.

Due to the way data binding works in .NET, pending changes to the current row may not have been committed to the data source when you are ready to save changes to the underlying data source. As such, you should always call the CommitChanges or CancelChanges method on the data navigator control prior to checking for or saving changes in its underlying data source.

Example

Assume dataSet has been assigned to dataNav as its data source.
C#
// Commit any pending edits in the data source
dataNav.CommitChanges();

// If changes were made to the data source, save them
if(dataSet.HasChanges())
    dataAdapter.Update(dataSet);

See Also