How to reassign filter from oSettings to datatables column filter?

How to reassign filter from oSettings to datatables column filter?

wizardxxlwizardxxl Posts: 2Questions: 2Answers: 0
edited May 2014 in Free community support

I'n implementing search history for my datatables.
I have a modal show all filter + sort on columns and global filter. When i click 1 item, datatable will reload data using these filter and sorting.
I use oTable.fnSettings().aoPreSearchCols, oTable.fnSettings().aaSorting, oTable.fnSettings().oPreviousSearch to config settings and then use oTable.fnDraw() to reload data.
It works fine: data is reloaded and sort direction on each column is updated but global filter and column filter are not populated with new value.

Is there any function that can assign value from oTable.fnSettings() to filter input text, just like with sorting ?
Thank you for your time and greate library.

Answers

  • RpiechuraRpiechura Posts: 98Questions: 3Answers: 14

    The search filters live inside oSettings, they're called sSearch (global) and sSearch_* (individual). I can't say I know how to set them without going into oSettings in something like the fnServerData and setting it manually though.

This discussion has been closed.