Ok so I am currently populating my datatable just fine with coldfusion and everything sorts perfectly. One of the columns in my SQL is the status. Currently I am returning all results WHERE status != ‘Completed’
This has worked fine for now, but what I would really like to do is place a checkbox on the page just above the datatable and when checked it would show all records including those that are completed.
Question is, can I do some kind of callback on the check box to dynamically omit the where clause, or do I deliver ALL records to datatables and filter it there? My only worry with that is when the database gets large, returning all records may take a while and 90% of the time they will be filtered out.
Either way, code snippets would be very helpful!
Thanks
RESOLVED
iKnowKungFoo was right. Since I am using pagination in
datatables, the query is limited to those rows anyway, eliminating the worry for the large return result.I implemented the following code to put a
jqueryuitoggle button.js
html
SQL