Is it possible to add DataItems to a Combobox in Runtime Modifications?
I am trying to add DataItems to a Combobox on a Form in RunTime. The Combobox is also added in RunTime modifications. I can create the Combobox using an Assign activity as shown below. However, I cannot find the method to add DataItems to this combobox. Any Ideas?
new ComboboxFormItem() With { .ItemID = Row.Item("FieldName").ToString, .Label= New LabelFormItem() With {.Text = Row.Item("DisplayName").ToString }, .Tooltip = Row.Item("DisplayName").ToString, .ArgumentName = Row.Item("FieldName").ToString }
0
-
The ComboboxFormItem has a DataItems property. You can use AddToCollection or AddRangeToCollection to add items to that list. 0 -
That did it. Thanks! 0 -
Can I get a little more clarification on this? I have a DataItem List I created from my SQL query. Is there a way to assign this list to the combobox? Or, do I actually have to iterate through the DataItem list and add items one by one to the combobox? 0 -
Hi Tami,
On the DisplayForm activity, look for the "Input Data" section. There will be a property that can be used to assign a DataItem list directly to your combobox. Just put your existing DataItemList variable in that box - and if you were previously using a different method to populate to combobox (like an ArcGIS Server query in the form designer), clear that part out.
_img_ alt="Input Data section on DisplayForm" src="https://latitudegeo--c.na53.content.force.com/servlet/rtaImage?eid=907f200000013pn&feoid=Body&refid=0EMf2000000xFrN"_/_img_
Hope that helps!
-Amanda0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer