Skip to main content
A newer version of this page is available. .

ColumnViewOptionsBehavior.EditorShowMode Property

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

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v18.2.dll

Declaration

[DefaultValue(EditorShowMode.Default)]
[XtraSerializableProperty]
public virtual EditorShowMode EditorShowMode { get; set; }

Property Value

Type Default Description
EditorShowMode **Default**

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 Grid Control, the Default value is equivalent to:

For the PivotGrid control, this option acts as the EditorShowMode.MouseDownFocused option.

MouseDown

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

MouseUp

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

Click

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).

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).

Property Paths

You can access this nested property as listed below:

Object Type Path to EditorShowMode
AdvBandedGridView
.OptionsBehavior.EditorShowMode
BandedGridView
.OptionsBehavior.EditorShowMode
ColumnView
.OptionsBehavior.EditorShowMode
CardView
.OptionsBehavior.EditorShowMode
GridView
.OptionsBehavior.EditorShowMode
LayoutView
.OptionsBehavior.EditorShowMode
TileView
.OptionsBehavior.EditorShowMode
WinExplorerView
.OptionsBehavior.EditorShowMode

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.Click.

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

If the EditorShowMode property is set to EditorShowMode.Default, the actual editor activation mode is determined by the current multiple selection mode. See the EditorShowMode.Default topic for more information.

Important

Starting with version 18.2, Auto Filter Row cells always invoke their editors on user clicks regardless of the EditorShowMode property value (i.e., these cells always function in the EditorShowMode.MouseDown mode). Currently, there is no option to revert this change back to the v18.1 state, but you can handle the ColumnView.ShownEditor event and manually select all cell text to allow end-users type in search criteria immediately after they click an Auto Filter Row cell.


private void GridView1_ShownEditor(object sender, EventArgs e)
{
     GridView view = sender as GridView;
     if(view.IsFilterRow(view.FocusedRowHandle))
     {
         view.ActiveEditor.MouseUp += Edit_MouseUp;
     }
}

private void Edit_MouseUp(object sender, MouseEventArgs e)
{
     TextEdit edit = sender as TextEdit;
     edit.SelectAll();
     edit.MouseUp -= Edit_MouseUp;
}

Note that in MouseDown mode, 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 ImageComboBoxEdit control, clicking a cell activates the editor and immediately opens its dropdown. In Click and MouseUp modes, the first click on a cell is not passed to the cell’s in-place editor. For instance, in MouseUp mode, if an in-place editor represents a ImageComboBoxEdit control, the first click activates the editor. The editor’s dropdown is opened by the second click.

If the CTRL, ALT or SHIFT modifier key is pressed while clicking a cell, the cell is focused, but the cell editor is not activated.

The following code snippets (auto-collected from DevExpress Examples) contain references to the EditorShowMode property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also