property Items.CellMerge([Item as Variant], [ColIndex as Variant]) as Variant
Retrieves or sets a value that indicates the index of the cell that's merged to.

TypeDescription
Item as Variant A long expression that indicates the item's handle.
ColIndex as Variant A long expression that indicates the column's index, a string expression that indicates the column's caption or the column's key.
Variant A long expression that indicates the index of the cell that's merged with, a safe array that holds the indexes of the cells being merged.
Use the CellMerge property to combine two or more cells in the same item in a single cell. The data of the source cell is displayed in the new larger cell. All the other cells' data is not lost. Use the ItemDivider property to display a single cell in the entire item ( merging all cells in the same item ). Use the UnmergeCells method to unmerge the merged cells. Use the CellMerge property to unmerge a single cell. Use the MergeCells method to combine one or more cells in a single cell. Use the Add method to add new columns to the control. Use the SplitCell property to split a cell.

You can merge the first three cells in the root item using any of the following methods:

The following sample shows few methods to unmerge cells: 

The following VB sample merges the first three cells in the focused item:

With G2antt1.Items
    .CellMerge(.FocusItem, 0) = 1
    .CellMerge(.FocusItem, 0) = 2
End With

The following C++ sample merges the first three cells in the focused item:

#include "Items.h"
CItems items = m_g2antt.GetItems();
COleVariant vtItem( items.GetFocusItem() ), vtColumn( long( 0 ) );
items.SetCellMerge( vtItem, vtColumn, COleVariant( long(1) ) );
items.SetCellMerge( vtItem, vtColumn, COleVariant( long(2) ) );

The following VB.NET sample merges the first three cells in the focused item:

With AxG2antt1.Items
    .CellMerge(.FocusItem, 0) = 1
    .CellMerge(.FocusItem, 0) = 2
End With

The following C# sample merges the first three cells in the focused item:

axG2antt1.Items.set_CellMerge(axG2antt1.Items.FocusItem, 0, 1);
axG2antt1.Items.set_CellMerge(axG2antt1.Items.FocusItem, 0, 2);

The following VFP sample merges the first three cells in the focused item:

with thisform.G2antt1.Items
	.DefaultItem = .FocusItem
	.CellMerge(0,0) = 1
	.CellMerge(0,0) = 2
endwith

In other words, the sample shows how to display the first cell using the space occupied by three cells.