Although the AutoCommitListView property is public, it is controlled from within the controller and it is not intuitive to customize it:
See the following tickets for details:
Problem with Focus in ListView when AutoCommit = true,
Error 1007 with ListViewAutoCommitController when clicking an Action that gets disabled during the commit operation,
Save action disabled because of "Is Modified" - caused by ListViewAutoCommitController.
This controller can be also refactored to avoid a problem described in the UI.Win - TreeList focus is restored incorrectly after canceling changes in ListViewAndDetailView mode ticket.
Core - Redesign ListViewAutoCommitController and WinDetailViewController to customize them properly
Answers approved by DevExpress Support
We have implemented the functionality described in this ticket. It will be included in our next update(s).
Please check back and leave a comment to this response to let us know whether or not this solution addresses your concerns.
We have introduced the new ModificationsController controller with two platform-specific descendants (WinModificationsController and WebModificationsController). These controllers are activated for both Detail and List Views and replace the obsolete DetailViewController, WinDetailViewController, WebDetailViewController, and ListViewAutoCommitController. The new ModificationsController.ModificationsHandlingMode property, which specifies the application behavior when a user modifies data and then changes the current object or closes the View, should be used instead of the AutoCommitListView and SuppressConfirmation properties. The ModificationsHandlingMode possible values are:
Confirmation – the “Do you want to save changes” confirmation is displayed;
AutoCommit - data modifications are committed automatically;
AutoRollback - data modifications are discarded.
To specify the ModificationsHandlingMode in your code, inherit WinModificationsController and/or WebModificationsController and override the OnActivated method.
C#class MyWinModificationsController : WinModificationsController {
protected override void OnActivated() {
base.OnActivated();
if ((View is ListView) & (TargetObjectType == typeof(Task)))
this.ModificationsHandlingMode =
DevExpress.ExpressApp.SystemModule.ModificationsHandlingMode.AutoCommit;
}
}
Note that a custom value should be assigned after the base class’ OnActivated method is called, as the default value is calculated by this method. Avoid changing the ModificationsHandlingMode by accessing the ModificationsController from a custom controller via the Frame.GetController .method. Your custom controller may be activated before the ModificationsController activation, and your customization will be ignored.
See also:
Core - Support the capability to save all changes automatically (disable all confirmation requests)
SystemModules - Make it possible to edit multiple records in an editable ListView at once and save the changes only when needed
- v13.1.4Download Official Update
Will this be implemented in 12.2?
No, we have not yet planned this suggestion for any particular release.