CGrid:SetTH_Titles
The SetTH_Titles method sets the titles for a top heading row. The titles are taken from a 1-dimensional table, and the number of table elements determines how many columns of the top heading are set. If there is more than one top heading row, the specific row must also be specified. The default (first) top heading row is in top heading row 1. Going upward from the grid, the second top heading is in row 2, and so on.
Note: The top heading row numbering differs with the CGridView class. Going upward from the grid, the CGrid top headings are numbered 1, 2, 3, ..., whereas the CGridView top headings are numbered 0, -1, -2, ...
CGrid:SetTH_Titles( tblTitles )
CGrid:SetTH_Titles( tblTitles, nTopRow )
tblTitles is a 1-dimensional table containing titles for the top heading row.
nTopRow is the optional top heading row number to set. If omitted, the first top heading row is set.
The following script sets the titles for the first 4 (or all 4) columns of the default top heading in the first top row:
|
-- create a new CGrid object |
-- assemble the grid |
|
|
|
|
-- set titles in the default top heading row |
The next script sets the titles for the first 4 (or all 4) rows of the second top row. The first top row would need to be set in addition to row 2:
|
-- create a new CGrid object |
-- assemble the grid |
|
|
|
|
-- set titles for top row 2 |
CGrid class, SetSH_Titles, SetTH_Title
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.