PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Chained merge operations
  • Limits
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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
..Merge is used to merge the cells found in 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 name>..Merge
<Current merge mode>: Integer constant
Merge mode used on the element:
mergeNoneNo merge is performed.
mergeNextCellMerge the specified cell with the next cell (on the same row).
mergeNextLineMerge the specified cell with the cell found on the next row.
mergeNextTitleMerge the title of the column with the title of the next column.
<Element name>: Character string (with or without quotes)
Name of element used:
  • Cell: <Column name> [ <Row Subscript>]
  • Title of a column: <Column name>

Merging the cells or the column titles Hide the details

<Element name>..Merge = <Merge mode>
<Element name>: Character string (with or without quotes)
Name of element used:
  • Cell: <Column name> [ <Row Subscript>]
  • Title of a column: <Column name>
<Merge mode>: Integer constant
One of the available merge modes:
mergeNoneNo merge is performed.
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.
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.

Limits

  • 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 popup menu or with TableToExcel, TableToClipboard, TableToText, TableToWord, TableToXML), the merge of columns is ignored.
  • ..Merge can only be used on the 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