Skip to main content

DataViewBase.EditorShowMode Property

Gets or sets a value which specifies how a cell editor is activated by the mouse. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public EditorShowMode EditorShowMode { get; set; }

Property Value

Type Description
EditorShowMode

A EditorShowMode enumeration value which specifies how a cell editor is activated by the mouse.

Available values:

Name Description
Default

Specifies the default behavior.

For the GridControl, this option acts as the EditorShowMode.MouseDown option.

If the grid functions in marquee selection mode or the multiple cell selection is enabled, this option acts as the EditorShowMode.MouseUpFocused.

MouseDown

A cell’s in-place editor is activated when the left mouse button is pressed.

MouseDownFocused

If a cell is focused and not being edited, an in-place editor is opened on pressing the mouse button. Clicking a non-focused cell focuses the cell first, and a subsequent mouse-down event activates the in-place editor (if not prohibited).

MouseUp

A cell’s in-place editor is activated when a mouse button is released from a click within the cell.

MouseUpFocused

If a cell is focused and not being edited, an in-place editor is opened on a click (the mouse button is pressed and then released). Clicking a non-focused cell focuses the cell first, and a subsequent click activates the in-place editor (if not prohibited).

Remarks

See the EditorShowMode topic for information on the available editor activation modes.

If in-place editors must not be invoked on the first click (useful for browsing records with data editing support), set the EditorShowMode property to EditorShowMode.MouseUpFocused.

To support drag and drop operations within a View, set the EditorShowMode property to either EditorShowMode.MouseUp or EditorShowMode.MouseUpFocused.

Note that in EditorShowMode.MouseDown and EditorShowMode.MouseDownFocused modes, the first click on a cell opens the editor, and then this mouse event is passed to the activated editor. For instance, if an in-place editor represents a ComboBoxEdit control, clicking a cell activates the editor and immediately opens its drop-down.

In EditorShowMode.MouseUp and EditorShowMode.MouseUpFocused modes, the first click on a cell is not passed to the cell’s in-place editor. For instance, in EditorShowMode.MouseUp mode, if an in-place editor represents a ComboBoxEdit control, the first click activates the editor. The editor’s dropdown is opened by the second click.

If the Selection Rectangle feature is enabled (the DataViewBase.ShowSelectionRectangle property is set to true), and the EditorShowMode property is set to EditorShowMode.Default, the grid will display editors only for a focused row. This means that in order to edit a cell value, your end-users should click a required cell/row to focus it, then click the required cell again to activate its editor and edit a cell value.

See Also