GRID.ItemType

Previous  Next

 

state = GRID.ItemType( BYVAL nControl AS INTEGER,

                       BYVAL row      AS INTEGER,

                       BYVAL column   AS INTEGER,

                       BYVAL type     AS INTEGER ) AS INTEGER

 

 

 

 

Returns the type of the specified cell.

 

Following constants have been defined in MyBASIC2_MaxGRIDX.BAS

 

' Cell Types

CONST MG_CELL_NOTYPE       = -1

CONST MG_CELL_DEFAULT      = 0

CONST MG_CELL_STRING       = 1

CONST MG_CELL_INTEGER      = 2

CONST MG_CELL_REAL         = 3

 

Example:

 

DIM str AS STRING

Str = “Donald Duck”

 

IF GRID.ItemType( nControl, 1, 1 ) = MG_CELL_STRING THEN

  GRID.ItemText( nControl, 1, 1, str )

ENDIF