Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

How to visualize a field as a ComboBox in a grid.

1.  Through the Field Component source add a Picklist visualization ( PRIM_EVPL ) and a Picklist. Note that these are separate classes in the Field source. Add PicklistItems for Male and Female to the Picklist.

2.  Save the field.

3.  Create a grid component. From the fields tab add the SEX field to the grid as a column. Set the following properties on the column:

...

     ReadOnly = FALSE.

...

     DisplayAppearance=Edit

...

     EditAppearance=Edit

...

     UsePicklist = TRUE.

4.  Load the grid and the column can  be edited as a dropdown combo.

Field Source

     Begin_Com Role(*EXTENDS #PRIM_OBJT)
Begin_Com Role(*Visual #PRIM_EVEF) Name(#VisualEdit) Defaultvisual(True) Height(19) Usepicklist(False) Width(178)
End_Com
Begin_Com Role(*picklist) Name(#LIST)
Define_Com Class(#PRIM_PKIT) Name(#ITEM1) Caption('Male') Default(True) Parent(#LIST) Value('M')
Define_Com Class(#PRIM_PKIT) Name(#ITEM2) Caption('Female') Parent(#LIST) Value('F')
End_Com
Begin_Com Role(*Visual #PRIM_EVPL) Name(#VisualPicklist) Appearance(DropDownList) Height(69) Width(209)
End_Com
End_Com

...