views:

36

answers:

1

I need to implement a feature that would allow users to filter table data in Excel like style, i.e. dropdown menu in column headers with list of checkboxes or checkboxes grouped hierarchicaly. For instance for date column I would like to show treeview with year as root node, then month when year node expands and day on the last level. All that with checkboxes so that users can select several values.

I've looked around a bit and all existing plugins do pretty basic filtering - ascending/descending or freetext search. I have tried to extend 'dropdownchecklist' plugin but came to a point when it seemed easier to write new plugin from scratch.

Any tips or ideas are appriciated!

+3  A: 

The closest I can find is jqGrid with an integrated search toolbar which sort of acts like a filter.

Have a look here: http://trirand.com/blog/jqgrid/jqgrid.html

You'll need to expand 'New in Version 3.5' under items and then click on 'Integrated Search Toolbar' to see the demo.

There is a non-jQuery library called ExtJS that has many components, grids being one of their main ones, that definitely does it like Excel: http://dev.sencha.com/deploy/dev/examples/grid-filtering/grid-filter-local.html

If the Grid is a major part of your application and you need this excel like functionality maybe consider using ExtJS. You can use jQuery alongside it too, although it does have some core features that do similar things to jQuery.

Moin Zaman
Thank you for your answer! Both ExtJS and jqGrid would be overkill in my situation since what need is a lightweight component thats easily plugs in into existing layout with no need to rebuild whole table. I think I'll end up writing my own plugin...
igorti