HELP!! Is it possible to set up a datatable/columnfilter with filterable select?
HELP!! Is it possible to set up a datatable/columnfilter with filterable select?
NiceGuy
Posts: 1Questions: 1Answers: 0
Please anyone .. I need help or a push ion the right direction.
I am basically looking for something (anything) similar to this:
http://demos.kendoui.com/web/grid/filter-menu-customization.html
kendoui.com and extjs are not open-source and simply do not qualify.
I have been playing around with datatables but nothing has met my
requirements thus.
Anyone please?
This discussion has been closed.
Answers
I've implemented custom filtering in Datatables that's pretty similar to your example - tough it's on an intranet site so I can't link to it for you.
It's a fair bit of work, but if you are handy with JavaScript and jQuery, it's not too hard.
I get the data delivered from the server in AJAX format, including the definitions for the columns. Before initializing the table I loop through the columns, building up new column headers to include the HTML for filter buttons for the columns where it's needed.
After table init, I set up event handlers for the buttons - to pop up the filter options. I set up change event handlers on the filter options to call functions that will invoke filtering on the required column using fnFilter.
You can try my yadcf plugin for datatables http://yadcf-showcase.appspot.com/