Kbase P160751: How to use the AddRange method with the ultraComboEditor to load a range of objects
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/03/2010 |
|
Status: Unverified
GOAL:
How to use the AddRange method with the ultraComboEditor to load a range of objects
GOAL:
How to convert an ABL array of strings to be used with the AddRange method of the ultraComboEditor
GOAL:
How to convert a list of ABL character values to an array of ValueListItem objects
FACT(s) (Environment):
Windows
OpenEdge 10.2x
FIX:
In order to use AddRange to add list items to a ultraComboEditor you first have to create an array of ValueListItem objects, then pass that array to the method.
DEFINE VARIABLE cList AS CHARACTER INITIAL "One,Two,Three" NO-UNDO.
DEFINE VARIABLE oValueList AS Infragistics.Win.ValueListItem EXTENT NO-UNDO.
DEFINE VARIABLE iExtent AS INTEGER NO-UNDO.
EXTENT(oValueList) = NUM-ENTRIES(cList).
DO iExtent = 1 TO NUM-ENTRIES(cList):
oValueList[iExtent] = NEW Infragistics.Win.ValueListItem(ENTRY(iExtent,cList)).
END.
oUltraComboEditor1:Items:AddRange(oValueList).