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][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.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    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

  • [Deleted User][Deleted User] Posts: 0Questions: 1Answers: 0
    edited November 2018

    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-

    Retracted on request by original author by Allan
    
  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    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.

This discussion has been closed.