Back to Devexpress

WindowsFormsSettings.InplaceEditorUpdateMode Property

windowsforms-devexpress-dot-xtraeditors-dot-windowsformssettings-b53c9dcb.md

latest4.6 KB
Original Source

WindowsFormsSettings.InplaceEditorUpdateMode Property

Gets or sets whether in-place editors post their value to the bound data source immediately after the value changes. This property is supported for a limited set of editors.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.Utils.v25.2.dll

NuGet Packages : DevExpress.Utils, DevExpress.Wpf.Core

Declaration

csharp
public static InplaceEditorUpdateMode InplaceEditorUpdateMode { get; set; }
vb
Public Shared Property InplaceEditorUpdateMode As InplaceEditorUpdateMode

Property Value

TypeDescription
DevExpress.XtraEditors.InplaceEditorUpdateMode

The edit value update/post mode.

|

Remarks

InplaceEditorUpdateMode is a global setting for all in-place editors in bars and data-aware controls (for example, Data Grid, TreeList, Vertical Grid, etc.). This behavior is supported by in-place editors where the input does not rely on text editing:

If the InplaceEditorUpdateMode property is set to InplaceEditorUpdateMode.Immediate, the editor posts its value to the data source as soon as its value changes (without waiting for the cell to lose focus).

csharp
using System;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace DXApplication {
    internal static class Program {
        [STAThread]
        static void Main() {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            // Enable the InplaceEditorUpdateMode global setting.
            WindowsFormsSettings.InplaceEditorUpdateMode = InplaceEditorUpdateMode.Immediate;
            Application.Run(new Form1());
        }
    }
}

If the InplaceEditorUpdateMode property is set to InplaceEditorUpdateMode.Postponed, the editor posts its value after losing focus (for example, when the user focuses another grid cell).

The aforementioned data editors introduce the InplaceModeImmediatePostChanges property that allows you to specify update behavior for individual editors:

Data EditorAPI
CheckEditRepositoryItemCheckEdit.InplaceModeImmediatePostChanges
ToggleSwitchRepositoryItemToggleSwitch.InplaceModeImmediatePostChanges
RatingControlRepositoryItemRatingControl.InplaceModeImmediatePostChanges
RadioGroupRepositoryItemRadioGroup.InplaceModeImmediatePostChanges
TrackBarControlRepositoryItemTrackBar.InplaceModeImmediatePostChanges
PopupBaseEdit descendantsRepositoryItemPopupBase.InplaceModeImmediatePostChanges

Note

The editor’s InplaceModeImmediatePostChanges setting takes priority over the InplaceEditorUpdateMode global setting.

See Also

EditValue

EditValueChanged

WindowsFormsSettings Class

WindowsFormsSettings Members

DevExpress.XtraEditors Namespace