expressappframework-devexpress-dot-expressapp-dot-systemmodule-0a46b003.md
Use this controller to implement custom strategies of conflict detection and resolution.
Namespace : DevExpress.ExpressApp.SystemModule
Assembly : DevExpress.ExpressApp.v25.2.dll
NuGet Package : DevExpress.ExpressApp
public class ProcessDataLockingInfoController :
ObjectViewController
Public Class ProcessDataLockingInfoController
Inherits ObjectViewController
When you execute Save , Save and New , or Save and Close Actions, this controller calls the Object Space code that collects the following information:
You can access and modify this information in the DataLockingProcessing event.
The following code snippet enables automatic merge in XAF applications:
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.SystemModule;
namespace MainDemo.Module.Controllers;
public class AutoMergeViewController : ViewController {
private ProcessDataLockingInfoController lockController;
private void OnDataLocking(object sender, DataLockingProcessingEventArgs e) {
foreach (var info in e.DataLockingInfo.ObjectLockingInfo) {
info.CanAutoMerge = info.CanMerge;
}
}
protected override void OnActivated() {
base.OnActivated();
lockController = Frame.GetController<ProcessDataLockingInfoController>();
lockController.DataLockingProcessing += OnDataLocking;
}
protected override void OnDeactivated() {
base.OnDeactivated();
if (lockController != null) {
lockController.DataLockingProcessing -= OnDataLocking;
lockController = null;
}
}
}
Object MarshalByRefObject Component Controller ViewController ViewController<ObjectView> ObjectViewController ProcessDataLockingInfoController
See Also