Skip to main content
All docs
V25.1
  • .NET Framework 4.6.2+

    DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    ProcessDataLockingInfoController Class

    Use this controller to implement custom strategies of conflict detection and resolution.

    Namespace: DevExpress.ExpressApp.SystemModule

    Assembly: DevExpress.ExpressApp.v25.1.dll

    NuGet Package: DevExpress.ExpressApp

    #Declaration

    public class ProcessDataLockingInfoController :
        ObjectViewController

    #Remarks

    When you execute Save, Save and New, or Save and Close Actions, this controller calls the Object Space code that collects the following information:

    • Local modified objects
    • Objects modified by other users
    • Conflict detection and resolution strategies implemented in your application

    You can access and modify this information in the DataLockingProcessing event.

    The following code snippet enables automatic merge in XAF applications:

    C#
    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;
            }
        }
    }
    

    #Implements

    See Also