CGridView:GetType
The GetType method sets the data type of a grid cell. A cell value can always be retrieved as a string, but there may be occasions when the data need to be interpreted as other types of information.
data_type = CGridView:GetType( nCol, nRow )
Where nCol, and nRow are the coordinates of the cell to set.
Where data_type is a numeric code for the type of information contained in the specified cell.
The data_type is a numeric code that specifies the interpretation of the cell values, as defined in the table below.
Data Type |
Interpretation |
1 |
String |
2 |
Number |
3 |
|
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 |
The following script sets the cell contents of (column 5, row 10) to "My value":
|
-- attach a grid on the Mira desktop |
|
-- return the type of cell (5,10) |
|
-- if this is a string value... |
|
-- print a string |
|
-- else if this is a numeric value... |
|
-- print a number |
|
|
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.