Page 1 of 1

(RDMLX) Dropdown or date control in table

Posted: Thu Apr 11, 2013 7:15 pm
by cklee
Is it possible to have dropdown or date control associated with the cells of a column in a table?

Re: Dropdown or date control in table

Posted: Fri Apr 12, 2013 9:57 am
by Paul
Yes it is possible.

When using LongRange LANSA take the Using Tables form view, LREX0004, as an example and add the following code;

Define Date and Dropdown table columns

Code: Select all

#COM_OWNER.Set_Table Name(Table1) Col_N(4) Col_Name(Date) Col_Width(Fit)
#COM_OWNER.Set_Table Name(Table1) Col_N(5) Col_Name(Dropdown) Col_Width(fill)
Set column headings

Code: Select all

#COM_OWNER.Set_Label Name('Table1.Col%4.HEADER') Text('Date') Color(Blue)
#COM_OWNER.Set_Label Name('Table1.Col%5.HEADER') Text('Dropdown') Color(Blue)
Set up date and dropdown table cells

Code: Select all

#COM_OWNER.Set_Date Name(#TableRow + '.Date') Datetimevalueformat('ddMMyyyy') Datedisplayformat('dd/MM/yyyy') Value('28102005')
#COM_OWNER.Set_Dropdown Name(#TableRow + '.Dropdown') Value(M) Onvaluechange(VALUECHANGE)
#COM_OWNER.Set_Dropdown Name(#TableRow + '.Dropdown') Item_N(1) Item_Text('Female') Item_Value(F)
#COM_OWNER.Set_Dropdown Name(#TableRow + '.Dropdown') Item_N(2) Item_Text('Male') Item_Value(M)
#COM_OWNER.Set_Dropdown Name(#TableRow + '.Dropdown') Item_N(3) Item_Text('Not Specified') Item_Value(N)
The important point about setting up an element as a table cell is to name it correctly with row number and column name. The LongRange programming guilds have more details about setting up tables.