Calling fnStateLoad Manually

Calling fnStateLoad Manually

sabricksabrick Posts: 10Questions: 4Answers: 0

I'm trying to call fnStateLoad directly instead of letting it call automatically on the page load event:

_reportTable_DT.oApi._fnLoadState(_settings, _data)

_settings in this case is the oSettings object

_data is the JSON parsed data object that was saved during the _fnSaveState event

However when I run the command the table does nothing, I've tried the redraw table command and still no luck. Is what I'm trying to do even possible? Can you call a fnLoadState in this way to load a state after the table has already drawn? Do I have to redraw the table?

Any help would be greatly appreciated!

Answers

  • allanallan Posts: 61,627Questions: 1Answers: 10,090 Site admin

    There is no public API for calling fnLoadState programmatically. There is an issue in github about providing API methods to be able to clear the state, get the current state and trigger a save, but why would you want to call _fnLoadState?

    Allan

This discussion has been closed.