
This method will set the drop down lists for cells with the styles. If the column has been preset with list items, this function will override that list(s) for the specified cell only.
Returns the following according to the situation:
The recommended convention is passing the control identifier directly:
Copy Code |
|---|
(Odcl_Grid_SetItemDropList MyControlReference [as Reference] nRowIndex [as Integer] nColIndex [as Integer] (list sChoiceText1 [as String] [Optional] sChoiceValue1 [as Integer] sChoiceText2 [as String] [Optional] sChoiceValue2 [as Integer] ... sChoiceTextN [as String] [Optional] sChoiceValueN [as Integer] ) ) |
An alternative convention is to identify the control by providing the project file, the dialog name and the control name:
Copy Code |
|---|
(Odcl_Grid_SetItemDropList ProjectFile [as String] DialogName [as String] ControlName [as String] nRowIndex [as Integer] nColIndex [as Integer] (list sChoiceText1 [as String] [Optional] sChoiceValue1 [as Integer] sChoiceText2 [as String] [Optional] sChoiceValue2 [as Integer] ... sChoiceTextN [as String] [Optional] sChoiceValueN [as Integer] ) ) |
The style set to the cell or column only governs the behavior of the cell and what happens when the user clicks on the cell.
For example if you set the style 38 - Integers Combo, all the items to be added to the drop list must be as strings. You are responsible to ensure the correct text is added.
Copy Code |
|---|
; Update the text of the third row on the fourth column (Odcl_Grid_SetItemDropList MyProject_MyForm_MyControl (list "Debit Card" 0 "Credit Card" 1 "Check" 3)) |
Grid_GetItemCheck, Grid_GetItemData, Grid_GetItemImage, Grid_GetItemText, Grid_SetItemCheck, Grid_SetItemData, Grid_SetItemImage, Grid_SetItemStyle, Grid_SetItemText