`

ExtJs中的ComboBox详细说明

阅读更多
Ext.form.ComboBox属性及常用方法详解
2010-09-28 12:35

属性
view : Ext.DataView

方法
ComboBox( Object config )
构造

clearValue() : void
清除所有文本/值对

collapse() : void
expand() : void
收起/展开下拉列表

doQuery( String query, Boolean forceAll ) : void
执行查询

getValue() : String
选择当前字段的值

isExpanded() : void
下拉列表是展开的?

select( Number index, Boolean scrollIntoView ) : void
选中第index列表项

selectByValue( String value, Boolean scrollIntoView ) : Boolean
选中值为value的列表项

setEditable( Boolean value ) : void
设editable属性为value

setValue( String value ) : void
设置当前值为

配置{
allQuery : String //''
autoCreate : Boolean/Object //{tag: "input", type: "text", size: "24", autocomplete: "off"}
displayField : String //显示字段
editable : Boolean //true当然就是combobox了,如果不可编辑就是一个select了
forceSelection : Boolean
handleHeight : Number //如果resiable为真时,设置
hiddenName : String
lazyInit : Boolean //除非得到焦点才开始初始化列表,默认为真
lazyRender : Boolean //除非请求,才开始输出,默认为假
listAlign : String //对齐方式,参见Ext.Element.alignTo,默认为'tl-bl'
listClass : String
listWidth : Number
loadingText : String //仅当mode = 'remote'时调用数据时显示的文本
maxHeight : Number //300
minChars : Number //最少输入多少个字开始响应,远程时默认为4,本地为0,如果不可编辑则此值无效
minListWidth : Number
mode : String //可选值local/remote之一,从本地还是远程取数据
pageSize : Number //在远程模式下,如果此值大于0会在底部显示一个翻页工具条
queryDelay : Number //查询延时,远程默认为500,本地10
queryParam : String //查询参数,默认为query
resizable : Boolean
selectOnFocus : Boolean
selectedClass : String
shadow : Boolean/String //True或"sides"为默认风格, "frame" for 4-way shadow, and "drop" for bottom-right
store : Ext.data.Store
title : String
transform : Mixed //对应一个select元素,可以将select转为combobox对象
triggerAction : String //点击按钮时的动作.默认为query
triggerClass : String
typeAhead : Boolean //false
typeAheadDelay : Number //250
valueField : String
valueNotFoundText : String //值不存在时的提示信息
}

事件
beforequery : ( Object queryEvent )
beforeselect : ( Ext.form.ComboBox combo, Ext.data.Record record, Number index )
collapse : ( Ext.form.ComboBox combo )
expand : ( Ext.form.ComboBox combo )
select : ( Ext.form.ComboBox combo, Ext.data.Record record, Number index )
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics