Why stateLoadCallback function JSON data not loading the into the Table.
Why stateLoadCallback function JSON data not loading the into the Table.
Omniwyse
Posts: 29Questions: 11Answers: 0
Getting JSON data from Backend but its not loading.
Ex: If I hide the Column1 and save the state of the tables. While loading the page I am getting the JSON data from backend correctly. But while loading into UI its not loading what ever I am getting from backend JSON.
stateLoadCallback: function (settings,callback) {
$.ajax( {
url: extract_url('/rest/load_state'),
data: {
loggedInUser : loggedInUser,
tableName : 'ZonesTable',
},
dataType: 'json',
success: function (json) {
callback(json);
}
} );
},
Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
Answers
Can you link to a test case showing the issue please? That looks like it should work okay.
Allan
First loading time its getting state load json from back end but its not loading properly.
after loading the data again its calling state save with default table state. and that to its calling twice.
Please help me I am totally struck with this.
Thanks .
And I just click on second page then state save function calling 2 times and why?
This is my editor code
This is my datatables code.
I'm not seeing anything that stands out as a problem to me there. I really would need a test case that I can step through with the debugger to understand why it isn't working.
Allan
I had the same problem and added
stateDuration: 0
to DataTables:That would be the same as disabling state saving.
If you are able to give me a link to a page showing the issue, I can look into it.
Allan