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

GridOptionsView.AllowCellMerge Property

Gets or sets whether neighboring cells with identical values merge.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v19.1.dll

Declaration

[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AllowCellMerge { get; set; }

Property Value

Type Default Description
Boolean **false**

true, to allow neighboring cells with identical values to merge; otherwise, false.

Property Paths

You can access this nested property as listed below:

Object Type Path to AllowCellMerge
AdvBandedGridView
.OptionsView.AllowCellMerge
BandedGridView
.OptionsView.AllowCellMerge
GridView
.OptionsView.AllowCellMerge

Remarks

The AllowCellMerge property controls the availability of the cell merge feature. If it is set to true this feature is enabled and neighboring cells with identical values may be merged.

When cell merging is enabled, you can still prevent cells in a specific column from being merged by setting the column’s OptionsColumn.AllowMerge property to DefaultBoolean.False.

Custom cell merging can also be implemented by handling the View’s GridView.CellMerge event.

When cell merging is enabled, specific features (such as cell editing, row multiple selection, etc.) aren’t available. See the Cells topic for more information.

An AdvBandedGridView View does not support the Cell Merging feature, because this View allows column cells to be arranged in several lines. Thus, cells that belong to a single column may not be neighbors. If it’s necessary to have bands and the Cell Merging feature, use the BandedGridView View instead.

Note

If the GridOptionsView.ShowPreview option is set to true, neighboring cells with identical values cannot be merged regardless of the AllowCellMerge property’s value.

The following code snippets (auto-collected from DevExpress Examples) contain references to the AllowCellMerge 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