CGridView:SetType CGridView:SetVertAlign

CGridView:SetVal


The SetVal method sets the contents and data type of a grid cell. The SetNum and SetStr methods do not require the data_type parameter.

Syntax

CGridView:SetVal( nCol, nRow, Val, data_type )

bullet.gif     nCol, and nRow are the coordinates of the cell to set.

bullet.gif    Where Val is the value to set.

bullet.gif    The data_type is a numeric code describing the type of Value. See Remarks, below.

Remarks

The data_type is a numeric code that specifies the interpretation of Val, as defined in the table below.

 

Data Type

Interpretation

1

String

2

Number

3

Boolean true or false

4

Time, as a string

5

Currency, as a string

10

Special time (hh:mm:ss.sss string)

11

Special date (yyyy/mm/dd string)

12

Special degrees (dd:mm:ss.sss or +dd°mm'ss.sss" string)

other (1)

String

Example

The following script sets the cell contents for columns 5 and 6 in row 10:

G = new_gridview("my_table", GridParams)

-- create a CGridView window

G:SetVal(5, 10, "my data", 1)

-- set a string (data type=1) in cell (5,10)

G:SetVal(6, 10, 15.35, 2)

-- set a number (data type=2) in cell (6,10)

Related Topics

CGridView class

GetVal

SetStr

SetNum

SetType

 

 


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