leikind / wice_grid

A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters
MIT License
537 stars 215 forks source link

External parameter to be submitted along with filter form #153

Closed sridharraman closed 9 years ago

sridharraman commented 10 years ago

By default, all the filters are run on data that is restricted to a six month window. But I want to provide a drop-down outside the grid that can be selected by the user to define the size of this window.

That is, if the user selects 12 months, the filter query should be run on data for the next 12 months. I have the controller and model code for this.

But I am unable to submit an external parameter when the form is submitted. How do I do it?

leikind commented 10 years ago

You can add your own dropdown+form that would define that parameter. Then use this params[you_value] in the conditions of initialize_grid