ExtJs combobox 自定义过滤-模糊过滤.
其实是复制ComboBox的doQuery方法体,进行修改..
this.myCombo.on('beforequery',function(qe){
var combo = qe.combo;
//q is the text that user inputed.
var q = qe.query;
forceAll = qe.forceAll;
if(forceAll === true || (q.length >= combo.minChars)){
if(combo.lastQuery !== q){
combo.lastQuery = q;
if(combo.mode == 'local'){
combo.selectedIndex = -1;
if(forceAll){
combo.store.clearFilter();
}else{
combo.store.filterBy(function(record,id){
var text = record.get(combo.displayField);
//在这里写自己的过滤代码
return (text.indexOf(q)!=-1);
});
}
combo.onLoad();
}else{
combo.store.baseParams[combo.queryParam] = q;
combo.store.load({
params: combo.getParams(q)
});
combo.expand();
}
}else{
combo.selectedIndex = -1;
combo.onLoad();
}
}
return false;
});
分享到:
相关推荐
在 ExtJS3.3基础上开发的. 低一点的版本应该也能用. 没有去测试. 参考: Ext.PagingToolbar.js 因为我开发测试完这个分页工具后, 电脑上显示刚好是15:00, 所以取名: PM3PagingToolbar 如有BUG还请各位提出或留言. ...
ExtJs常用布局--layout详解实例代码: ExtJs常见的布局方式有:border、form、absolute、column、accordion、table、fit、card、anchor 另外,不常见的布局有:tab、vbox、hbox 具体使用方法可见该文件的案例代码。 ...
在 ExtJS3.3基础上开发的. 低一点的版本应该也能用. 没有去测试. 参考: Ext.PagingToolbar.js 如有BUG还请各位提出或留言. 附件中有图片, 一看就知道. 用法: var grid = new Ext.grid.GridPanel({ bbar: new Ext....
Extjs4---combobox省市区三级联动+struts2
自定义下拉树,你懂的,内附图和前后台源代码
一个extjs的OA项目 extjs-OA extjs-oaextjs-OA extjs-oa
NULL 博文链接:https://dengli19881102.iteye.com/blog/1046190
extjs2----关于extjs 的使用,操作.比较初级,但是也比较使用。适合初步接触extjs的朋友
ExtJS----HelloWorld程序源码
ExtJS快速入门--传智播客--蔡世友
extjs in action 1-6章节 pdf extjs in action 1-6章节 pdf
extJs2.0+spket-1.6.11.zip extJs2.0+spket-1.6.11.zip
Extjs4---grid的修改、删除功能---结合struts2、hibernate
extjs_4.1.0_community_extjs4-mvc-complex-dashboard
EXTJS开发包ext-3.2.0 EXTJS开发包ext-3.2.0
extjs-theme-bootstrap-master.zip
ExtJs-4.1.1a-gpl+中午手册+入门教程
ext基本的控件例子ext基本的控件例子ext基本的控件例子ext基本的控件例子