Server Side State Save
Server Side State Save
Hi everybody,
I'm doing server side state saving , i get a request without the information of which type of ordering i need to save , i only get the column wich i'm ordering, this are all the request parameters i get:
Parameter Name - time, Value - 1493885592510
Parameter Name - start, Value - 0
Parameter Name - length, Value - 2
Parameter Name - order[0][], Value - 2
Parameter Name - search[search], Value -
Parameter Name - search[smart], Value - true
Parameter Name - search[regex], Value - false
Parameter Name - search[caseInsensitive], Value - true
Parameter Name - columns[0][visible], Value - true
Parameter Name - columns[0][search][search], Value -
Parameter Name - columns[0][search][smart], Value - true
Parameter Name - columns[0][search][regex], Value - false
Parameter Name - columns[0][search][caseInsensitive], Value - true
Parameter Name - columns[1][visible], Value - true
Parameter Name - columns[1][search][search], Value -
Parameter Name - columns[1][search][smart], Value - true
Parameter Name - columns[1][search][regex], Value - false
Parameter Name - columns[1][search][caseInsensitive], Value - true
Parameter Name - columns[2][visible], Value - true
Parameter Name - columns[2][search][search], Value -
Parameter Name - columns[2][search][smart], Value - true
Parameter Name - columns[2][search][regex], Value - false
Parameter Name - columns[2][search][caseInsensitive], Value - true
Parameter Name - columns[3][visible], Value - true
Parameter Name - columns[3][search][search], Value -
Parameter Name - columns[3][search][smart], Value - true
Parameter Name - columns[3][search][regex], Value - false
Parameter Name - columns[3][search][caseInsensitive], Value - true
this is my call:
var table = $('#tab').DataTable( {
"pageLength": 2,
"lengthMenu": [ 2, 4, 8, 12, 30 ],
"ajax": "http://localhost:8080/Test/TestFunz",
"columns": [
{ "data": "nome"},
{ "data": "cognome"},
{ "data":"indirizzo"},
{ "data": "cap"}
],
"stateSave": true,
"stateSaveCallback": function (settings, data) {
$.ajax( {
"url": "http://localhost:8080/Test/TestSaveData",
"data": data,
"dataType": "json",
"type": "POST",
"success": function () {}
} );
}
});
What am i missing?