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!