Column_Combo_Add_Item - DfBaseEntryList
Adds an item to the end of the combo form's dropdown list for a column
Type: Procedure
Parameters
| Parameter | Type | Description |
|---|---|---|
| iColumn | integer | The column number (0-based) |
| sValue | string | The value to be added to the combolist |
Syntax
Procedure Column_Combo_Add_Item integer iColumn string sValue
Call Example
Send Column_Combo_Add_Item iColumn sValue
Description
This is the message that must be used to fill the list of items that appear in the combo form's dropdown list.
Sample
This sample sets column 2 to be a combo column, then adds "Type 1" and "Type 2" to the combo's dropdown list.
set Column_Combo_State 2 to True
Send Column_Combo_Add_Item 2 "Type 1"
Send Column_Combo_Add_Item 2 "Type 2"
Sample
This sample fills a grid with 20 rows of 3 columns each. It then instructs the grid to make column 2 a combo form, to sort the combo form's dropdown list, and adds 3 items to the dropdown list.
Procedure DoFillGrid
integer iRow iMaxRows iCount
string sCustomerName
move "John Q. Customer" to sCustomerName
move 20 To iMaxRows
For iRow From 1 To iMaxRows
Send Add_Item Msg_None (sCustomerName + string (iRow)))
Send Add_Item Msg_None ("305-555-1212")
Send Add_Item Msg_None (if(mod(iCount,2)=0,"Type 1","Type 2"))
increment iCount
Loop
End_Procedure // DoFillGrid
send DoFillGrid
// make column 2 a combo
set Column_Combo_State 2 to True
// sort the dropdown list for the combo in column 2
set Column_Combo_Sort_State 2 to True
// add items to the dropdown list for the combo in column 2
Send Column_Combo_Add_Item 2 "Type 3"
Send Column_Combo_Add_Item 2 "Type 2"
Send Column_Combo_Add_Item 2 "Type 1"