BaseView.ForceDoubleClick Property

Gets or sets whether double-clicking within the View fires the DoubleClick event, even if a data cell has been double-clicked and its editor has been invoked on the first click.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

[Browsable(false)]
[XtraSerializableProperty(XtraSerializationVisibility.Hidden)]
public bool ForceDoubleClick { get; set; }
<Browsable(False)>
<XtraSerializableProperty(XtraSerializationVisibility.Hidden)>
Public Property ForceDoubleClick As Boolean

Property Value

Type Description
Boolean

true if the DoubleClick event fires when double-clicking within the View even if a data cell has been double-clicked; false if the DoubleClick event fires when double-clicking on any element except for the data cells which allow their in-place editors to be invoked on mouse clicking.

Remarks

The ForceDoubleClick property specifies whether the View's and the grid control's DoubleClick events fire when double-clicking within editable data cells. The ForceDoubleClick property is not in effect when double-clicking within readonly data cells and within other visual elements.

Typically, in-place editors are invoked for data cells on mouse clicking. Double-clicking within the View generates two single click events. When the ForceDoubleClick property is set to false (default value), double-clicking within data cells is processed as follows. The first click event is used to activate the cell's in-place editor. The second click event is delegated to the editor that has been activated, and the View doesn't respond to this click. So, the View's and the grid control's DoubleClick events don't fire in this instance.

If the ForceDoubleClick property is set to true, the DoubleClick events fire even if a data cell is double-clicked and its editor has been invoked on the first click.

By default the RepositoryItemPopupBase.ShowDropDown property of in-place popup editors is set to SingleClick, and so popup windows are opened by a single mouse click. In this instance, when double-clicking, the first click opens the popup and the second click immediately closes this popup. To prevent the popup from being immediately closed, you can set the RepositoryItemPopupBase.ShowDropDown property to DoubleClick or Never.

The View's and the grid control's DoubleClick events do not fire when double-clicking within open in-place editors. To process double-clicking within open in-place editors, handle the RepositoryItem.DoubleClick events.

See Also