ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Chained merge operations
  • Limitations
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Merging cells is used to merge several cells found in a Table or TreeView Table control into a single one: the internal borders of the cells disappear and the text is properly positioned in the new cell.

Merging cells or column titles is used to create controls that are easier to view (for Table controls used to display statistics for example).

Image of cell merge in a Table control
The Merge property is used to merge the cells of a Table or TreeView Table control. You can:
  • find out whether the cells or the column titles are merged.
  • merge the cells or the columns titles.
Important: When a cell is merged with the next cell, the content of the cell spreads over the next cell and the content of the next cell is not displayed.
Example
// Displays a specific text
TableAdd(TABLE_Customer, "List of customers in California")
// Merges the columns to display the text on all the columns
COL_LastName[1].Merge = mergeNextCell
COL_FirstName[1].Merge = mergeNextCell
Syntax

Finding out the merge mode Hide the details

<Current merge mode> = <Element used>.Merge
<Current merge mode>: Integer constant
Merge mode used on the element:
mergeNextCellMerge the specified cell with the next cell (on the same row).
mergeNextLineMerge the specified cell with the cell found on the next row.
Caution: the next row must exist otherwise the merge operation has no effect.
mergeNextTitleMerge the title of the column with the title of the next column.
mergeNoneNo merge is performed.
<Element used>: Character string
Name of element used:
  • Cell: <Column name> [ <Row index>]
  • Column title: <Column name>

Merging the cells or the column titles Hide the details

<Element used>.Merge = <Merge mode>
<Element used>: Character string
Name of element used:
  • Cell: <Column name> [ <Row index>]
  • Column title: <Column name>
<Merge mode>: Integer constant
One of the available merge modes:
mergeNextCellMerge the specified cell with the next cell (on the same row).
mergeNextLineMerge the specified cell with the cell found on the next row.
Caution: the next row must exist otherwise the merge operation has no effect.
mergeNextTitleMerge the title of the column with the title of the next column.
mergeNoneNo merge is performed.

In all the cases, the content of the cells is not merged.
Remarks

Chained merge operations

If the merged column is the last visible column, the merge operation has no effect.

Limitations

  • The merge operations are canceled when a deletion, an insertion or a sort is performed on the control: they must be re-created.
  • The merge operation is available for the cells and columns found in the Table and TreeView Table controls .
  • The constants for merging the cells horizontally and vertically cannot be associated.
  • Selecting a row that contains merged cells may produce unexpected effects.
  • When exporting a Table control (via the context menu or with TableToExcel, TableToClipboard, TableToText, TableToWord, TableToXML), the merge of columns is ignored.
  • The Merge property can only be used on Table and TreeView Table controls.
  • You have the ability to merge a column title and to keep the non-merged columns (to display the data in value and in percentage for example).
    If the title of the column contains the main title and the title of sub-columns ("Contacts" on the first line, "Nb" and "%" on the second line for example):
    • you may have to modify the title in order for the titles of sub-columns to be aligned (addition of space characters for example).
    • when resizing the sub-columns, the title of the sub-columns will not be resized.
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/08/2024

Send a report | Local help