Update grid.js

The grid filter mechanism should only apply for rows that are currently visible.
Also it should be consistent when the user hide some columns, it should trigger the filter event again