Back to Devexpress

GridOptionsView.AllowCellMerge Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridoptionsview-61473862.md

latest3.8 KB
Original Source

GridOptionsView.AllowCellMerge Property

Gets or sets whether neighboring cells with identical values merge.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
[DefaultValue(false)]
[XtraSerializableProperty]
public virtual bool AllowCellMerge { get; set; }
vb
<DefaultValue(False)>
<XtraSerializableProperty>
Public Overridable Property AllowCellMerge As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

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

|

Property Paths

You can access this nested property as listed below:

Object TypePath to AllowCellMerge
GridView

.OptionsView .AllowCellMerge

|

Remarks

Set the AllowCellMerge property to true to enable cell merging.

Watch Video Run Demo

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

You can also handle the View’s GridView.CellMerge event to merge cells manually.

The GridOptionsView.MergedCellEditMode property specifies how users can edit merged cells.

Note

  • When cell merging is enabled, specific features (multiple row selection, focused cell appearance, etc.) are not available. Read the following topic for more information: Cells.
  • An AdvBandedGridView does not support the Cell Merging feature because this View allows column cells to be arranged in several lines (cells that belong to a single column may not be neighboring cells). Use the BandedGridView instead.
  • If the GridOptionsView.ShowPreview option is set to true , neighboring cells with identical values cannot be merged regardless of the AllowCellMerge property’s value.

See Also

CellMerge

AllowMerge

Cells

GridOptionsView Class

GridOptionsView Members

DevExpress.XtraGrid.Views.Grid Namespace