Filtering on greater than/less than
Filtering on greater than/less than
Right I thought I'd ask here first to potentially save me the hassle of making this sort of plugin myself,
Basically I'd like to filter the table on a certain column (my price column) so that users can effectively select what their budget is. ie They select a max price of $500, everything with more than 500 in the price column gets filtered
Basically I'd like to filter the table on a certain column (my price column) so that users can effectively select what their budget is. ie They select a max price of $500, everything with more than 500 in the price column gets filtered
This discussion has been closed.
Replies
Assuming you are using client-side processing, then you can use something very similar to http://datatables.net/examples/api/range_filtering.html (just take off the min...). If you are using server-side processing, then you'll need to modify your SQL to match the query as required.
Hope that helps,
Allan
http://datatables.net/examples/plug-ins/range_filtering.html
Allan
I am already sending the filter text like this:
oSettings.aoPreSearchCols[colToFilter].sSearch = value;
Is there a pre-defined variable inside oSettings, which can hold the filter operation information passed to the server or should I insert my own?
Something like:
oSettings.aoPreSearchCols[colToFilter].sSearchOperation = 'lt'; // lt, gt, le, ge, cn, before, after, etc go here as values