We have an issue with select item in the list, please see code below
- Code: Select all
var choiceListField = field as XfaChoiceListField;
switch (choiceListField.Name)
{
// Country
case "DataSource[0].Page1[0].Subform3[0].DropDownList2[0]":
// choiceListField.Items is empty list
// choiceListField.SelectedItem is null
choiceListField.SelectedItem = bank.GeneralCountryID ?? string.Empty;
break;
in choiceListField.GetEvents() we have following:
- Code: Select all
<event activity="initialize" name="event__initialize" xmlns="http://www.xfa.org/schema/xfa-template/2.8/"><script contentType="application/x-javascript">var selection = xfa.event.newText;
// if the list has text and value data for each item, then enable this line to get the value associated with the item
selection = this.boundItem(selection);
// reset the second list
DropDownList2.clearItems();
DropDownList2.addItem("","");
DropDownList2.addItem("AD,Andorra","AD");
DropDownList2.addItem("AE,Utd.Arab.Emir.","AE");
DropDownList2.addItem("AF,Afghanistan","AF");
DropDownList2.addItem("AG,Antigua/Barbuda","AG");
.......
How can we select an item? Is it possible to do with this lib?
Thanks