表单组件_v2.2(四)

1、下拉框组件支持中间模糊查询

function listener_ComboboxBeforeQuery(e){
	var combo = e.combo; 
	try{    
		var value = e.query;
		
		combo.lastQuery = value; 
		combo.store.filterBy(function(record,id){   
			var text = record.get(combo.displayField); 
			return (text.indexOf(value)!=-1);   
		});
		combo.onLoad();
		combo.expand();
		return false;
	}catch(e){
		combo.selectedIndex = -1;
		combo.store.clearFilter();
		combo.onLoad(); 
		combo.expand();
		return false;  
	}
}

  

你可能感兴趣的:(表单)