Contents - Index - Previous - Next


MergeHoriz method



Applies to
TProfGrid component

Declaration
function MergeHoriz(AStartCol, AEndCol, ARow: Integer; const Separator: WideString = ''): Boolean;

Description

Merges adjacent grid cells across (horizontally).

Call MergeHoriz to merge cells in the row specified by ARow parameter in columns from AStartCol thru AEndCol into a single merged cell.

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 columns with cells in scrollable columns.

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.