Reputation: 958
If I create several grids, how do I set the dataView.setFilter(filter) for each grid?
Currently when I apply dataView.Setfilter(filter), it only collects data from the last grid I created even if I push each grid to an array and then apply setFilter to grid[i].
many thanks for your help
Upvotes: 1
Views: 1245
Reputation: 17168
Are you creating a new DataView for each grid? You should be.
Any Grid initialized with a DataView in place of a plain array will allow you to access the specific DataView using grid.getData()
.
So to apply a filter to a specific DataView from your grid array you'd do:
grid[i].getData().setFilter(filter);
Upvotes: 2