Reputation: 994
Here is my code. I run this code on change event.
for(var i:uint =0; i< model.medicalHistoryDTOListByPatient.length; i++)
{
if(formatDateTime.format(model.medicalHistoryDTOListByPatient[i].VisitDate) == formatDateTime.format(id_VisitDatesCombo.selectedItem.VisitDate) )
{
Alert.show('Record already exsist against this Visit', 'Please select another date ');
id_HistoryView.enabled = false;
break;
}else{
if(model.CHistoryAssociatedVisit != null)
{
model.CHistoryAssociatedVisit.VisitDate = id_VisitDatesCombo.selectedItem.VisitDate;
model.CHistoryAssociatedVisit.ID = id_VisitDatesCombo.selectedItem.VisitId;
}
}
}
When if condition is matched and alert is popup then drop down still open and alert is shown.
How i close dropdownlist when i select one of item from Drop-down ?
Upvotes: 0
Views: 1106
Reputation: 39408
Use dropDownList.closeDropDown() to manually force the drop down list to close. This should also work for the Flex Spark ComboBox.
The MX ComboBox has a close method you can use.
Upvotes: 1