CGridView:UnJoinCells
The UnJoinCells method removes the joining of merged cells. This returns the joined block to individual cells. The coordinates of the join block are specified in units of the original column and row location of the original cell.
CGridView:UnJoinCells( nCol, nRow )
where nCol, and nRow refers to the cell to unjoin.
The following script creates a grid with 2 heading rows and joins the top-most row to cover groups of 3 columns. The heading row closest to the grid body (row index 0) is filled with default column labels (that may be changed using SetStr for columns in row 0). Cells in the second heading row at index -1 are joined into groups of 3 columns each and the labels "A", "B", "C", and "D" are assigned to the 4 joined column headings. Then the second joined cell is unjoined:
|
-- define the grid properties |
|
|
|
-- create 12 columns |
|
|
|
|
|
|
|
|
|
-- create 2 top heading rows |
|
-- each top heading row has a height of 16 |
|
|
|
-- create a new CGridView window |
|
-- create some simple labels |
|
-- index for accessing join labels |
|
-- get the column count |
|
-- step every 3rd column |
|
-- join the 3 columns, from nCol through nCol+2 |
|
-- 3 means align center |
|
-- set the title of the joined heading cells |
|
-- point index to the next label |
|
|
|
unjoin the second joined header cell. |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.