Exact filtering not returning results
Exact filtering not returning results
Hello everyone,
I'm using the following to try and filter a column by an exact result (data). However, it returns no matches.
$('#orders').DataTable().column( 8 ).search("^" + data + "$", true, false, true).draw() ;
Using this code with the same input returns matches, though not exact.
$('#orders').DataTable().column( 8 ).search( data ).draw() ;
Where am I going wrong?
Thanks,
Dan
This discussion has been closed.
Answers
I think I've worked out that it's because I'm using server side.
How can I go about implementing searching server side with regex?
Thanks
Dan.
Hi
You have to handle searching with regex in your application code.
List of parameters are sent by server:
https://datatables.net/manual/server-side
You can use
columns[i][search][value]andcolumns[i][search][regex]to get search parameter and check if you should use regex.Hi and thanks,
Are there any available examples of using server side in that way? I don't understand how to change parameters sent.
My current ajax code just sits at :