Search override / advanced functions

Search override / advanced functions

getalexgetalex Posts: 39Questions: 11Answers: 1

I absolutely love the built in datatables search functionality. While it comes in very handy, my users would like to be able to search above and beyond what's rendered - in other words, if the result is not in the datatable, go search the database.

Are there any examples of this? i don't think a plug-in would be what i'm looking for ... maybe a way to add a link where the "No matching records found" text is rendered, and said link would take the text from search and do an ajax call to get some results back. Or maybe if I could inject a button next to the search box? so users can click the button to do the server search and come back with results...

I'm open to ideas and implementation options, I haven't found much that particularly tackles the issue I'm trying to solve. Replies much appreciated, thank you.

Answers

  • kthorngrenkthorngren Posts: 21,300Questions: 26Answers: 4,945

    This example doesn't exactly match what you want to do but it might help you get started.
    http://live.datatables.net/wecuvaho/1/edit

    Basically it takes over the default global search input either does a global search or search on a specific column. You can change this to perform an ajax request or whatever you want.

    Kevin

This discussion has been closed.