Retaining search criteria

Retaining search criteria

SKRSKR Posts: 13Questions: 0Answers: 0
edited June 2012 in DataTables 1.9
Hi,

I am new to DataTables. I have a screen which has a datatable. When a value is entered in the search textbox, filtering takes place globally as well as on columns. How can I retain this search text so that the next time I visit this screen, I dont have to type the search criteria again. Is there a way to do this in jquery DataTables?

Replies

  • jainankit0312jainankit0312 Posts: 22Questions: 1Answers: 0
    Hi,

    I believe it is there already. Type something in search, close the window, hit the URL again.
    It shows the data with the previous search text only.

    Am I missing something ?

    Regards,
    Ankit
  • SKRSKR Posts: 13Questions: 0Answers: 0
    Thanks for the response. I am working on an existing project that uses datatables. So according to your response I think search text is being reset to blank in my application. But I am confused regarding which property should be set so that the search text is not reset. Any idea?
  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    Have you tried the state saving that is built into DataTables: http://datatables.net/release-datatables/examples/basic_init/state_save.html ?

    Allan
  • SKRSKR Posts: 13Questions: 0Answers: 0
    Thanks a lot!! This helped.
This discussion has been closed.