No matching records found
No matching records found
Dakado
Posts: 2Questions: 1Answers: 0
For some reason if I type anything in the search button, it always says "No matching records found". Data sorting is not working either.
My code:
https://jsfiddle.net/o2Lhe8wf/1/
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
There are a few problems with your code. First you have two
tbody
tags. Datatables supports only one. For more info see the Datatable HTML requirements.Since you don't have a footer the column search event handler (
$('input', this.footer()).on('keyup change clear', function() {
) you have ininitComplete
is executing after the main search from your global search input. Basically there is one global search then 5, one for each column, column searches. This causes no matches.I commented out the second
tbody
, added a footer, added the code to generate the footer search inputs (from this example and commented out the invalidcolumnDefs
. You only want onecolumnDefs
option defined.Here is the updated test case:
https://jsfiddle.net/5oy4twv1/
Kevin
Thanks worked.