CGrid:SetSH_Titles


The SetSH_Titles method sets the titles for a side heading column. The titles are taken from a 1-dimensional table, and the number of table elements determines how many rows of the side column are set. If there is more than one side heading column, the specific column must also be specified. The default (first) side heading column is in side heading column 1. Going leftward from the grid, the second side heading is in column 2, and so on.

Note: The side heading column numbering differs with the CGridView class. Going leftward from the grid, the CGrid side headings are numbered 1, 2, 3, ..., whereas the CGridView side headings are numbered 0, -1, -2, ...

Syntax

CGrid:SetSH_Titles( tblTitles )

CGrid:SetSH_Titles( tblTitles, nSideCol )

bullet.gif    tblTitles is a 1-dimensional table containing titles for the side header column.

bullet.gif    nSideCol is the optional side heading column number to set. If omitted, the first side column is set.

Example

The following script sets the titles for the first 4 (or all 4) rows of the default side heading in the first side column:

G = new_grid()

-- create a new CGrid object

-- assemble the grid

 

tblTitles = { "A", "B", "C", "D" }

 

G:SetSH_Titles( tblTitles )

-- set titles in the default side heading column

The next script sets the titles for the first 4 (or all 4) rows of the the side heading in the second side column. The first side column would need to be set in addition to column 2:

G = new_grid()

-- create a new CGrid object

-- assemble the grid

 

tblTitles = { "A", "B", "C", "D" }

 

G:SetSH_Titles( tblTitles, 2 )

-- set titles for side column 2

Related Topics

CGrid class, SetSH_Title, SetTH_Titles


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.