why you need to set index value to combo box?
if you want to sort combo objects:
public var sortCollection:Sort = new Sort();
sortCollection.fields=[new SortField("label")]; // instead of label you can use any of your attribute
cmbObject.dataProvider.sort = sortCollection;
i think the items are ordered in the same order as they are in the dataprovider.
so you sort your dataprovider in the base of ID field, and that will solve.
Thanks for the answers but I don't need to sort the items.
I need the index value of the combo box to be the same as the XML values as the data will be sent back to the server where the choice will be stored in a database so the ID value will have to match that supplied by the XML.
comboBox.selectedItem.eventTypeID you can send back to server to save in db.
Are you able to see combo-box items? I think it should have data & label property on the objects your are adding to comboBox dataProvider. In data you can set eventTypeID value & label will visible to user.
Thanks for your response
Using comboBox.selectedItem.eventTypeID returns me the value I am after.