public void CommitChanges()
Public Sub CommitChanges
public:
void CommitChanges()
member CommitChanges : unit -> unit
This will call the CommitChanges method on the current row template. It will also call the EndCurrentEdit method for the data source on 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 list control prior to checking for or saving changes in its underlying data source.
// Commit any pending edits in the data list
dataList.CommitChanges();
// If changes were made to the data source, save them
if(dataSet.HasChanges())
dataAdapter.Update(dataSet);
' Commit any pending edits in the data list
dataList.CommitChanges()
' If changes were made to the data source, save them
If dataSet.HasChanges() Then
dataAdapter.Update(dataSet)
End If
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.