It seems that column().search() does not trigger ajax search, Any suggestions
It seems that column().search() does not trigger ajax search, Any suggestions
MaWa69
Posts: 5Questions: 1Answers: 0
Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
Answers
This example of "external" input with search value works fine without ajax, but not with ajax.
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
This doesn't look the the correct syntax. I think it should be
$('#search_filter)'.val()
.Start troubleshooting by looking at the browser's console for errors and using the browser's network inspector to see the XHR request that is sent.
If you still need help please post a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Sorry i was messing around with the code..
This does not work either..
You have
serverSide
enabled, so the filtering needs to be done by your server-side script. So as Kevin said, you'll need to debug that.Colin
I found out that the search word appears in columns[0][search][value] in the ajax request.
I cannot find documentation for searching searching vis search[value] programatically.
Ofcause I can make a work around, but is there a correct way to search globally like the native search box;
The data sent to the server is documented here. How it is then processed will depend on whatever programming environment you are using at the server-side. We provide libraries for .NET, PHP and Node.js that you could use. For any others, or if you didn't want to use ours, the data that the server must send back is also documented on that page.
Important to note that you should only use server-side processing if you have at least tens of thousands of rows in the table.
Allan