Advice for treating sorting and filtering independently?
Advice for treating sorting and filtering independently?
Hi Alan, could I get your thoughts on something? :)
We have some columns where a single cell might have contents something like:
5/20/2011 Review requirements
5/25/2011 Draft proposal
5/30/2011 Send proposal
We want the column to sort by each cell's first date, so we put the first date in a DIV attribute, and use Custom Data Source Sorting (http://datatables.net/development/sorting#data_source) to extract the date attribute when sorting (also, in some cases we'll allow in-place editing of dates, and dynamically update the date attribute).
The issue we've run into is that the filter feature is also looking at the date attribute. Unlike the sort, we'd like the filter to look at the contents of each cell (so that you can search for e.g. "Send proposal").
I think what we'd like to do is treat sorting and filtering independently of each other.
Do you have any suggestions?
We have some columns where a single cell might have contents something like:
5/20/2011 Review requirements
5/25/2011 Draft proposal
5/30/2011 Send proposal
We want the column to sort by each cell's first date, so we put the first date in a DIV attribute, and use Custom Data Source Sorting (http://datatables.net/development/sorting#data_source) to extract the date attribute when sorting (also, in some cases we'll allow in-place editing of dates, and dynamically update the date attribute).
The issue we've run into is that the filter feature is also looking at the date attribute. Unlike the sort, we'd like the filter to look at the contents of each cell (so that you can search for e.g. "Send proposal").
I think what we'd like to do is treat sorting and filtering independently of each other.
Do you have any suggestions?
This discussion has been closed.
Replies
Regards,
Allan