ExX过滤XML数据

XMLListCollection的filterFunction过滤xml数据

XMLListCollection.refresh()触发过滤动作

设置数据非过滤状态,设置filterFunction属性为null

 

private function filterEmployees(item:XML):Boolean{
	var searchResult:XMLList;
	searchResult = item.(firstname == textfield1.text);
	//多个断言过滤条件
	//searchResult = item.(firstname == textfield1.text || lastname == textfield1.text);
	if(searchResult.legth()>0){
		return true;
	}else{
		return false;
	}
}

dataGrid.filterFunction = filterEmployees;
 

你可能感兴趣的:(xml)