bStateSave not working corretly
bStateSave not working corretly
Hi, i have set the bStateSave parameter set to true but havnt managed to get the state saving to work. here is my code
I create the table like this:
[code]
$("#dtable").dataTable({
"bPaginate" : true,
"bRetrieve" : true,
"bJQueryUI" : true,
"bLengthChange" : false,
"iDisplayLength" : 50,
"sScrollY" : "255px",
"bStateSave": true,
"aoColumns" : [ {"sTitle" : "Value 1"},
{"sTitle" : "Value 2"},
{"sTitle" : "Value 3"},
{"sTitle" : "Value 4"} ]
[/code]
I update the table data like this:
[code]
updateData : function() {
// Reinitialize table
var table = $("#dtable").dataTable();
// Clear Table
table.fnClearTable();
// Populate Table
table.fnAddData(this.model.get("tableData"));
}
[/code]
Filtering seems to be saved between updates but not scrolling or pagination. Any tips?
Thanks in advance
/Eric
I create the table like this:
[code]
$("#dtable").dataTable({
"bPaginate" : true,
"bRetrieve" : true,
"bJQueryUI" : true,
"bLengthChange" : false,
"iDisplayLength" : 50,
"sScrollY" : "255px",
"bStateSave": true,
"aoColumns" : [ {"sTitle" : "Value 1"},
{"sTitle" : "Value 2"},
{"sTitle" : "Value 3"},
{"sTitle" : "Value 4"} ]
[/code]
I update the table data like this:
[code]
updateData : function() {
// Reinitialize table
var table = $("#dtable").dataTable();
// Clear Table
table.fnClearTable();
// Populate Table
table.fnAddData(this.model.get("tableData"));
}
[/code]
Filtering seems to be saved between updates but not scrolling or pagination. Any tips?
Thanks in advance
/Eric
This discussion has been closed.
Replies
Allan