可编辑下拉列表

李陵少 2013-09-27 02:46:10
Extjs做的可编辑下拉列表,当编辑的时候会触发什么事件?

var comb = new Ext.form.ComboBox({
name:"category2",
store:moduleStore,
valueField:'valueId',
displayField:'valueName',
mode: 'local',
triggerAction: 'all',
editable:true,
readOnly: false,
renderTo:'selectdiv',
listeners:{
select:{
fn:function(combo,record,index) {
catagoryName = record.get("valueId");
paramsObj.category = catagoryName;
store.load({params:paramsObj});
}
}
}
})
...全文
154 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
李陵少 2013-09-27
  • 打赏
  • 举报
回复
谢谢你,自己瞎搞,弄出来了,我这样做的... var moduleStore = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: config.basic_url+'webview/videoDay_'+'getVideoCategoryTop' }), reader: new Ext.data.JsonReader({ totalProperty: "totalRecords", root: 'items', fields:['valueId','valueName'] }), listeners: { datachanged: function(obj) { storetmp = obj; var invar = document.getElementById("category2").value; for(var i=0;i<obj.length;i++){ var record = obj.getAt(i); var vn = record.get("valueName"); if(vn.indexOf(invar)==-1){ } } //obj.removeAll(); } } });
lzpggg 2013-09-27
  • 打赏
  • 举报
回复

beforequery : ( Object queryEvent )
Fires before all queries are processed. Return false to cancel the query or set the queryEvent's cancel property to true.
Listeners will be called with the following arguments:
queryEvent : Object
An object that has these properties:
combo : Ext.form.ComboBox
This combo box
query : String
The query
forceAll : Boolean
True to force "all" query
cancel : Boolean
Set to true to cancel the query
李陵少 2013-09-27
  • 打赏
  • 举报
回复
悲剧了,放假都休息了...
李陵少 2013-09-27
  • 打赏
  • 举报
回复
就没高手么?

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧