CGridView:SetVal
The SetVal method sets the contents and data type of a grid cell.
CGridView:SetVal( nCol, nRow, Value, data_type )
nCol, and nRow are the coordinates of the cell to set.
Where Value is the value to set.
The data_type is a number describing the type of Value. See Remarks, below.
The data_type number specifies the interpretation of Value, as defined in the table below.
Data Type |
Value Type |
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) |
11 |
Special date (yyyy/mm/dd) |
12 |
Special degrees (dd:mm:ss.sss or +dd°mm'ss.sss") |
other (1) |
String |
The following script sets the cell contents for columns 5 and 6 in row 10:
|
-- create a CGridView window |
|
-- set a string (data type=1) in cell (5,10) |
|
-- set a number (data type=2) in cell (6,10) |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.