CGridView:SetCol


The SetCol method saves the contents of a 1-dimensional table to a column of the CGridView.

Syntax

CGridView:SetCol( tbl, nCol )

CGridView:SetCol( tbl, nCol, nRowMin )

CGridView:SetCol( tbl, nCol, nRowMin, nRowMax )

bullet.gif    Where tbl is a 1-dimensional array with values that are numbers. containing the values to set.

bullet.gif    Where nCol is the column to set. If no row range is specified, the column values are set starting in row 1.

bullet.gif    nRowMin is the first row to set and nRowMax is the last row to set.

Example

The following script sets the cells in column 4 starting with row 2:

G = new_gridview("My Grid", GridParams)

-- create CGridView with properties in GridParams

tbl = { 4.5, 16, -4.1, 6 }

-- create a table to save into column 4.

G:SetCol(tbl, 4, 2)

-- sets the contents of column 4

Related Topics

CGridView class, GetCol, SetRow, SetStr, SetRect


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