Spread 8.0 Documentation
RowMerge Property
Support Options
ActiveX Reference > ActiveX Properties > RowMerge Property

Glossary Item Box

RowMerge Property


See Also    DLL    Example

Applies To

fpSpread control

Description

Sets or returns whether or how cells in a row that have the same content are grouped in a single cell spanning multiple columns. This property is available at run time only.

Syntax

C++

long CSpreadSheet::GetRowMerge( );
void CSpreadSheet::SetRowMerge(long value);

Visual Basic

[form.]fpSpread.RowMerge[ = setting%]

Remarks

The following settings are available:

Setting Description Constants
0 - None (Default) Cells with the same content are not merged MergeNone
1 - Always Cells with the same content are always merged MergeAlways
2 - Restricted Cells with the same content are merged only when adjacent cells to the top are also merged MergeRestricted

This setting is applied to the current sheet setting unless you first set the Sheet property to specify the sheet for which you are setting the property. Set the Row property before setting the RowMerge property to specify the row for which you are setting the merge behavior.

Note: You cannot set the Row property to –1 to specify that all rows allow merging. You must specify the merge setting for each row individually.

The following figure illustrates setting 2 (Restricted). In the figure, row 1 is set to 1 (Always) and row 2 is set to 2 (Restricted). As shown in the figure, the cells in row 2 merge only when the cells immediately above them are also merged. Cell A2 would merge with cells B2 and C2 if the user typed "cats" in cell A1.

Merged cells take on the properties of the top-left merged cell. For example, if the top-left merged cell has a blue background color, the cells that merge with it display the same background color.

Merged cells do not lose their data; it is simply hidden by the merge. If you remove the merge, for example, by setting the RowMerge property to 0 (None), the data appears in each cell that was in the merge. You can edit a cell that is merged with another cell. When you double-click the cell to turn edit mode on, the contents of the cell appear in the cell for you to edit them. When you leave edit mode, if the contents of the cell are no longer identical to the cell or cells with which it was previously merged, the cells are no longer displayed as merged.

Cells that are different cell types but have the same contents can merge. For example, a date cell might contain the contents "01/31/02" and the adjacent edit cell might contain the same contents; if the row containing the cells is set to merge, the cells will merge. If the contents change or the merge is removed, the cells maintain their cell types as well as their data.

Use the ColMerge property to specify whether and how to merge cells that have the same content in a column.

Spread Designer

Choose the Sheet menu, then the Columns and Rows menu, select the Rows tab, and then select an item in the Auto Merge drop-down list box in the Settings-Current Row group box in the Column and Row Settings dialog box.

Data Type

Integer (Enumerated)

See Also

Merging Cells

ColMerge, Row, Sheet properties

DLL Correspondence

SSGetRowMerge, SSSetRowMerge functions

Copyright © GrapeCity, inc. All rights reserved.