网格实时搜索extjs
grid live search extjs
我的实时搜索网格works fine
,但当我点击下一页或做关于网格的其他事情时,搜索网格失去高亮项搜索,有人帮我做什么吗?我想保持高亮的条款搜索在所有页面。由于
显示我的代码片段:
var pagingStore = Ext.create('Ext.data.Store', {
proxy: {
type: 'memory',
enablePaging: true
},
remoteFilter: true,
pageSize: 5
}),
remoteStore = Ext.create('Ext.data.Store', {
autoLoad: true,
proxy: {
type: 'ajax',
url: 'js/json/pagingStore.json',
reader: {
rootProperty: 'items'
}
},
fields: ['name', 'email', 'phone', 'type']
});
remoteStore.load(function () {
pagingStore.getProxy().setData(remoteStore.getRange());
pagingStore.load();
});
var bbar = new Ext.PagingToolbar({
store: pagingStore, //the store you use in your grid
displayInfo: true,
items: [ {
xtype: 'textfield',
name: 'searchField',
id: 'txtfield',
fieldLabel:'Search:',
labelAlign:'right',
emptyText:'search...',
width: 300,
listeners: {
change: {
fn: onTextFieldChange
}
}
}
]
});
bbar.down('#refresh').hide();
Ext.create('Ext.grid.Panel', {
height: 400,
title: 'Simpsons',
id: 'gridPanel',
store: pagingStore,
columns: [{
text: 'Name',
dataIndex: 'name',
filterable: true
}, {
text: 'Email',
dataIndex: 'email'
}, {
text: 'Phone',
dataIndex: 'phone'
},
{
text: 'Type',
dataIndex: 'type'
}],
bbar: bbar,
renderTo: Ext.getBody()
});
所以我回答了我自己的问题,我已经创建了一个highlight()方法并将其放在容器上:每次单击字段搜索输入后,高亮显示留在搜索条件上:;)
cont.getEl().on({
click: {
fn: highlight
}
});
相关文章:
- 用程序搜索JQuery数据表中的文本
- ExtJS 5用程序点击actioncolumn gridview
- ExtJS——在展开/折叠时调整面板高度
- 在html Select中添加搜索
- Ajax Live搜索发布到Laravel视图
- 谷歌放置API:按国家或餐馆名称搜索餐馆
- 学生搜索项目jquery/javascript
- 用于搜索的聚合物嵌套绑定
- 在javascript中搜索具有重复值的两个数组中的匹配值
- Angularjs-utils高亮过滤器在搜索时破坏应用程序
- 使用javascript搜索具有用户输入的数组
- 淘汰搜索/筛选
- 搜索api在mac上显示对话框
- 如何获取ExtJs 4.1.1中的搜索按钮
- 如何在 Extjs 中使用多选功能,并在您键入时进行搜索
- 如何在ExtJs中的面板中搜索子项
- 如何像JqGrid中那样创建ExtJS网格工具栏搜索
- 网格实时搜索extjs
- 在extjs树存储中搜索
- Extjs组合作为自动完成搜索框,同步