Dropdownlist控件连动

/**
 * Dropdownlist1变化
 */
private function dropdownlist1Change():void {
	dropdownlist1.dataProvider = List1;
	dropdownlist2.filterFunction = dropdownlist2FilterFunc;
	dropdownlist2.refresh();
}

/**
 * dropdownlist2过滤函数
 */
private function dropdownlist2FilterFunc(value:Object):Object{
	if (value.key != dropdownlist1.selectedItem.key){
		return false;
	} else {
		return true;
	}
}

 

你可能感兴趣的:(list)