`
kakarot_java
  • 浏览: 161913 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Ext combobox 默认值

阅读更多
new Ext.form.ComboBox({
id : 'cardtypecombo',
fieldLabel : '证件类型',
name : 'user.userIdtype',
emptyText : '选择证件类型..',
valueField : "typeId",
hiddenName : 'user.userIdtype',
displayField : "text",
tpl : '<tpl for="."><div class="x-combo-list-item"  qtip="{text}">{text}</div></tpl>',
selectOnFocus : true,
editable : false,
triggerAction : 'all',
selectOnFocus : true,
typeAhead : true,
forceSelection : true,
width : 300,
value:1, // 设置默认值 该值指向valueField 列的值
mode : 'local',
store : new Ext.data.SimpleStore({
fields : ["typeId", "text"],
data : [
[1,
'身份证'],
[2, '学生证'], [3, '军官证'],
[4, '工作证'], [5, '其他']]

})
})
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics