ExtJS :: How to filter rows in a grid, but not store
I have two nets, they have one store. I need to show everything in the first store and special data from that store in the second.
Example: the first store shows every record, the second store shows records with type = 12. How can I filter in a grid and not a store. I need two different grids, not filtering.
If I filter entries in the second grid through the storage, the tie will hide first. I will see it at the same time, and I need to see different data in them at the same time. And I only need one store.
+3
source to share
1 answer
One good way is to override the getRowClass () method of the GridView in a second grid:
var secondGrid = new Ext.grid.GridPanel({
//..
viewConfig: {
getRowClass: function(record, index) {
if (record.get('type') != '12') {
return 'display-false';
}
}
}
});
Also you must define a CSS class:
.display-false { display: none }
Try this solution!
+10
source to share