admin管理员组文章数量:1356478
I have two grids, thay both have one store. I need to show everything in first store, and special data from this store in second.
Example: First store shows every record, second store shown records with type = 12. How can I do filtering in grid, not in store. I need TWO different grids, not one with filtering.
If I will filter records in second grid by store, thay will hide in first. I will see it at the same time, and I need to see different data in them at the same time. And I need only one store.
I have two grids, thay both have one store. I need to show everything in first store, and special data from this store in second.
Example: First store shows every record, second store shown records with type = 12. How can I do filtering in grid, not in store. I need TWO different grids, not one with filtering.
If I will filter records in second grid by store, thay will hide in first. I will see it at the same time, and I need to see different data in them at the same time. And I need only one store.
Share Improve this question asked Apr 6, 2012 at 8:57 nkuhtankuhta 11.2k12 gold badges45 silver badges55 bronze badges1 Answer
Reset to default 10One good way is to override the method getRowClass() of GridView object in second grid:
var secondGrid = new Ext.grid.GridPanel({
//..
viewConfig: {
getRowClass: function(record, index) {
if (record.get('type') != '12') {
return 'display-false';
}
}
}
});
Also you should define a CSS class:
.display-false { display: none }
Try this solution!
本文标签: javascriptExtJS How to filter rows in gridbut not in storeStack Overflow
版权声明:本文标题:javascript - ExtJS:: How to filter rows in grid, but not in store - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743983389a2571173.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论