Grid - Cell Property

Reference to a specific cell in the list

Member of Grid (PRIM_GRID)

Data Type - PRIM_GDCE - Grid cell

Parameters

Name

Type

Data Type

Description

Row

*Input

Integer

Cell Row identifies the row of the cell

Column

*Input

Integer

Cell Column identifies the column of the cell

Details

The Cell property provides access to a Cell in the grid via the row number and column number.

Example

The example below uses the FocusItem entry and the first column to access the cell value.

     Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientwidth(794) Clientheight(367) Componentversion(2) Top(227) Left(199) Layoutmanager(#TableLayout1)

Define_Com Class(#PRIM_TBLO) Name(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(1) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#GridItem1) Column(#Column1) Manage(#Grid) Parent(#TableLayout1) Row(#Row1)

Define_Com Class(#PRIM_GRID) Name(#Grid) Captionnoblanklines(True) Columnscroll(False) Componentversion(1) Displayposition(1) Left(0) Parent(#COM_OWNER) Showselection(True) Showselectionhilight(False) Showsortarrow(True) Tabposition(1) Top(0) Height(367) Width(794) Tabbingstyle(AroundGrid) Columnbuttonheight(22) Rowheight(22)
Define_Com Class(#PRIM_GDCL) Name(#GridColumn1) Displayposition(1) Parent(#Grid) Source(#EMPNO) Width(14)
Define_Com Class(#PRIM_GDCL) Name(#GridColumn2) Displayposition(2) Parent(#Grid) Source(#SURNAME)
Define_Com Class(#PRIM_GDCL) Name(#GridColumn3) Displayposition(3) Parent(#Grid) Source(#GIVENAME)
Define_Com Class(#PRIM_GDCL) Name(#GridColumn4) Displayposition(4) Parent(#Grid) Source(#ADDRESS1)
Define_Com Class(#PRIM_GDCL) Name(#GridColumn5) Displayposition(5) Parent(#Grid) Source(#ADDRESS2)
Define_Com Class(#PRIM_GDCL) Name(#GridColumn6) Displayposition(6) Parent(#Grid) Source(#ADDRESS3)

Evtroutine Handling(#Com_Owner.CreateInstance)

Select Fields(#Grid) From_File(pslmst)

Add_Entry To_List(#Grid)

Endselect

Endroutine

Evtroutine Handling(#Grid.Changed)

#Com_owner.Caption := ("Item EMPNO - &1").Substitute( #Grid.Cell<#Grid.FocusItem.Entry 1>.Value )

Endroutine

End_Com

See also

All Component Classes

Technical Reference