I like the functionality of the Filter in this example:
http://mleibman.github.com/SlickGrid/examples/example-header-row.html
where each column has its own filter, but I also require the functionality of the Filter from:
http://mleibman.github.com/SlickGrid/examples/example4-model.html
In that it can be hidden and shown via button click.
Is it possible to have the Filters from the first link, with the “hide-ability” of the Filter from the second link? Thanks!
Yes, it is. You may use the method
grid.hideHeaderRowColumns()in the first example to hide the filter bar. Then usegrid.showHeaderRowColumns()to show it again.For example, navigate to the first link, and replace the contents of the URL bar with:
and hit Enter. You should see the filter bar slide up and away. If you are building your app from the first example code, you should be able to call these functions from almost anywhere, ie.
Note that in the second example, the author uses the following code to add a predefined, but hidden, element to the styled header bar:
And the hidden element: