extjs将html select标签直接转换成extjs ComboBox控件的方法,转换后更美观,功能更强大。
var minzuCombox = new Ext.form.ComboBox({
forceSelection:true,
selectOnFocus: true,
triggerAction: 'all',
transform:'myMinzuSelect',//这个就原来select标签的id
width:150,
mode:'local'
});
transform 属性的官方解释:
transform : Mixed
The id, DOM node or element of an existing HTML SELECT to convert to a ComboBox. Note that if you specify this and the combo is going to be in an Ext.form.BasicForm or Ext.form.FormPanel, you must also set lazyRender = true.