Filtering not working as desired
Filtering not working as desired
saudagarrizwan
Posts: 8Questions: 1Answers: 0
Hi,
Am using datatables in my application. Paging and sorting is done using this. I have a search filter. How it should work is, if a user searches “Math Benchmark 1”, then the result display matching the complete name first, then “Math Benchmark”, then “Math”, and finally any words from the assessment. The default sort order is the one most matching the criteria first. How could I do this using datatable? I tried using $.fn.dataTableExt.afnFiltering, but am not getting proper result.
I appreciate your help in this
Am using datatables in my application. Paging and sorting is done using this. I have a search filter. How it should work is, if a user searches “Math Benchmark 1”, then the result display matching the complete name first, then “Math Benchmark”, then “Math”, and finally any words from the assessment. The default sort order is the one most matching the criteria first. How could I do this using datatable? I tried using $.fn.dataTableExt.afnFiltering, but am not getting proper result.
I appreciate your help in this
This discussion has been closed.
Replies
http://datatables.net/development/sorting#data_source
I've not come across this type of search priority result requirement before, so would be interested to know how you get on. Normally filtering and sorting in DataTables are orthogonal.
Allan