Skip to main content

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.v23.2.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

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

The mode is not specified explicitly. The actual mode depends on the control and its settings. See remarks in the following topic for more information: EditorShowMode Enum.

MouseDown

A cell editor is activated when the left mouse button is pressed regardless of whether the cell is focused.

MouseUp

A cell editor is activated when the left mouse button is released regardless of whether the cell is focused.

Click

A cell editor is activated when the left mouse button is released in a focused cell.

MouseDownFocused

A cell editor is activated when the left mouse button is pressed in a focused cell.

Property Paths

You can access this nested property as listed below:

Object Type Path to EditorShowMode
ColumnView
.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