Contents - Index - Previous - Next


MergeVert method



Applies to
TProfGrid component

Declaration
function MergeVert(ACol, AStartRow, AEndRow: Integer; const Separator: WideString = ''): Boolean;

Description

Merges vertically adjacent grid cells into a single merged cell.

Use MergeVert to merge cells in the column specified by the ACol parameter in rows from AStartRow thru AEndRow.

When you merge cells that already contain some data, you can control the separation between existing data with the optional Separator parameter.

Returns True on success. Returns False on any of the following errors:
- invalid parameter or nothing to merge;
- attempt to merge cells in fixed rows with cells in scrollable rows.

Tips:

1. In Delphi, and in C++Builder 6, the Separator parameter has the default value of '' (empty string) and may be omitted.

2. To unmerge a merged cell, use the Split method of TProfGridCell class.