Search based on search

Search based on search

stesosteso Posts: 3Questions: 1Answers: 0

Hi all, I am new to using datatables and although I have a lot of things working I need to implement a certain type of search. For example, I am on https://mysite.com/#english in which it shows all the students in that class. In this way it performs a global search:

    $('#mysearch').keyup(function(){
        $('#mytable').DataTable().search($(this).val()).draw();
    });

How can I implement the search only for the displayed result? Any info would be appreciated

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Thanks for the link, but it's not working, and I'm not clear what you're after. That said, you can use regexs to join search terms together, or combine column searches with global search, please see example here.

    If that doesn't help, we're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

Sign In or Register to comment.