You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Grid Item - Cell Property
Reference to cell in the item accessible by column reference
Member of Grid Item (PRIM_GDIT)
Data Type - PRIM_GDCE - Grid cell

Parameters

Name

Type

Data Type

Description

Column

*Input

Integer

Reference to the column in which the cell is found

Details


The Cell property provides access to a Cell in the item via the column.

Example


The example below accesses the focus item and uses the first visible column to get the cell value from the focus item.
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.FocusItem.Cell<1>.Value )
Endroutine
End_Com

See also

All Component Classes
Technical Reference

  • No labels