leikind / wice_grid

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

Add an option for not rendering the right-most column. #230

Closed jasiek closed 9 years ago

leikind commented 9 years ago

Hey, I am sorry for such a long time without any reaction!

Could you please give a reason why it needs to be added when we have configuration variable REUSE_LAST_COLUMN_FOR_FILTER_ICONS?

jasiek commented 9 years ago

Sure.

So there are situations where you don't want to have a column that holds edit buttons for each record - for instance, records are very infrequently updated and it is sufficient to go to each record's detail view and call edit from there.

leikind commented 9 years ago

Right. And in this case Wice::Defaults::REUSE_LAST_COLUMN_FOR_FILTER_ICONS = true should do the trick and you won't see an empty column. Am I not right?

jasiek commented 9 years ago

I thought I tried that. Let me try again tomorrow, and I'll get back to you.

leikind commented 9 years ago

The default behavior is REUSE_LAST_COLUMN_FOR_FILTER_ICONS = true, it means that if the last column doesn't have any filter or a column name, it will be used for filter related icons (filter icon, reset icon, show/hide icon). If it doesn't work, I would like to take a look at you grid definition code.