how to search multiple values while using serverSide
how to search multiple values while using serverSide

How can I search 01 and 03 in dropdown. while using serverSide
$('#firstsecond').on('change', function(){
var dataCondition = this.value;
if(dataCondition == 'firstsecond') {
table.columns(136).search("01|03",true,false).draw();
}else{
table.columns(136).search(this.value).draw();
}
});
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
This discussion has been closed.
Answers
Hi @hashsalacop ,
This thread should help, it's asking the same thing.
Cheers,
Colin
Hi, Colin, I think it's not the right answer. I want to use multiple values of
Example in my column i have 1,2,3,4,5,6,5 different values. but i want to filter only 1 and 2 values in one dropdown. while im using serverside
here is the code if were not using serverside
``` table.columns(136).search("01|03",true,false).draw();
Are you asking for help with creating the drop down in the client or the regex search in your server script?
If in the client then maybe you can provide a simple example of what you have. This way we can help with your code.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
If asking about the search in the server script, then as explained in the thread Colin posted, you will need to add that support to your server script. This depends on what you are using for your server script and the database or whatever is being accessed. Note this comment from the developer Allan:
Kevin