How to stop Datatable's state change while re-render the data of column?
How to stop Datatable's state change while re-render the data of column?
[Deleted User]
Posts: 0Questions: 1Answers: 0
I have created a datatable and saved the state at server-side(using callback method "stateSaveCallback") and load the state using callback method "stateLoadCallback". But when I render the row column(using trigger col[0].render = function (data, type, row) {
......
......
}), datatable's state changed.
This discussion has been closed.
Answers
Hi @vijaykush03 ,
I suspect it's because your forcing a draw - and the draw would be the trigger of a change that prompts the stateSave. 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
Thanks @colin,
Too complicated for me to create test case of the page because I didn't wrote the logic. But sample code of the js is-
That's a lot of code to look through. Please link to the page, or create a test case, that demonstrates the problem, and we're happy to take a look.