Does datatble support mutiple searches ? if yes I want to implement it
Does datatble support mutiple searches ? if yes I want to implement it
I have worked on various datatables one thing i've noticed is if i apply search filter on a particular column it works well and for multiple it does not .. for example
i want to apply search on both columns like if my row is {name- alex and email - alex11@test.com} and there are multiple rows like these i should implement search.. if i apply filter on name, alex will appear meanwhile if i write alex11 in email column no data is found .. Please help me in finding a solution for this.
Answers
The "column filters" example works when combining filters.
https://datatables.net/examples/api/multi_filter.html
Find the difference(s) between the example and your own code.
Alternatively please provide a link to a test case showing the issue in accordance with the forum rules.
See if this thread helps.
Kevin
In the above example .. there is a initcomplete function i'm unable to put it in my code .. suggest me something
Why are you unable to use it? Do you get errors?
We've pointed you to two. working solutions. If you are unable to make either of them work then 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
See this test case i've implemented the javascript in the code
And its working fine for a particular column in the which we implement our search first and not for the second column. i wanted to implment that see this example
see the number of records down .. I should have got only one record
i started my search with column 2 then i searched in column but still records are returned from column 1
By test case I mean code that is running in an example we can look at. The code snippet you posted isn't enough for us to help. Looks like you are building two types of inputs. Please post a running example we can look at.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
EDIT: Your problem description is not clear. Please post the steps need to recreate the problem.
Kevin
Sorry i cant provide the test case as im not authorized to..!!
Thankyou
The test case doesn't have to have your exact data. It just needs to show the problem you are having. Maybe you can update one of our examples with your code to create the inputs and event handlers. You can create simulated data if need to show the problem.
Without some context of the data and the searches you are performing its hard to say why you would get the number of results that you are getting.
Kevin