bstatesave for multiple tables

bstatesave for multiple tables

walkowalko Posts: 2Questions: 0Answers: 0
edited February 2013 in General
Helo,
i try to integrate multiple tables on one site with state save function (bstatesave). But after page refresh only state of last 'touched' table is shown correctly. It seems like the state of other table will be not save.... Have anyone of you the same problem ? How can I fix it ?
Have anyone solution for that...

[code]
$(document).ready( function() {
$('#co_Table').dataTable( {
/* "sDom": '<"H"Cfrl>t<"F"ip>',*/
"bJQueryUI": true,
"iDisplayLength": 10,
"aLengthMenu": [
[10, 20, 50, 100, -1],
[10, 20, 50, 100, "All"]
],
"sPaginationType": "full_numbers",
"bStateSave": true,
"iCookieDuration": 60*60*8,
"aaSorting": [[ 2, "asc" ]],
{% if var.language in ['de'] %}"oLanguage": { "sUrl": "{{ var.sys_path }}/jscript/de_DE.txt" },{% endif %}
"aoColumns": [
/* { "sWidth": "100px" },*/
null,
{ "sType": "html" },
{ "sType": "date-eu" },
{ "bSortable": false},
null,
null,
null,
{ "sType": "text-between-html-tags", "sWidth": "200px" },
{ "bSortable": false}
],
"oColVis": { "aiExclude": [ 0, 1, 2, 5, 7, 8] ,
"bRestore": true }

}).columnFilter({
sPlaceHolder: "tfoot",
aoColumns: [
{ type: "select" },
{ type: "select"},
null,
null,
{ type: "text" },
{ type: "text" },
{ type: "text" },
{ type: "select" },
null
]
}
);
$('#ecr_Table').dataTable( {
/*"sDom": '<"H"Cfrl>t<"F"ip>',*/
/*"sDom": '<"leftcolumn"><"rightcolumn"<"H"TRClfr>t><"bottombar"<"F"ip>>',*/
"iDisplayLength": 10,
"aLengthMenu": [
[10, 20, 50, 100, -1],
[10, 20, 50, 100, "All"]
],
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bStateSave": true,
"iCookieDuration": 60*60*2,
"aaSorting": [[ 2, "asc" ]],
{% if var.language in ['de'] %}"oLanguage": { "sUrl": "{{ var.sys_path }}/jscript/de_DE.txt" },{% endif %}
"aoColumns": [
/* { "sWidth": "100px" },*/
null,
{ "sType": "text-between-html-tags" },
{ "sType": "date-eu" },
{ "bSortable": false},
null,
null,
null,
{ "sType": "text-between-html-tags" },
null,
null,
null,
null,
null
],
"oColVis": { "aiExclude": [ 0, 1, 2, 5, 7, 8] ,
"bRestore": true }
/*"bUseColVis": true */

}).columnFilter({
aoColumns: [
{ type: "select" },
{ type: "select"},
null,
null,
{ type: "text" },
{ type: "text" },
{ type: "select" },
{ type: "select" },
{ type: "select" },
{ type: "select" },
{ type: "text" },
{ type: "text" },
{ type: "text" }
]
}
);
});
[/code]

Replies

  • allanallan Posts: 61,446Questions: 1Answers: 10,054 Site admin
    Try using localStorage - http://datatables.net/blog/localStorage_for_state_saving . You might be hitting the cookie limit.

    Allan
  • walkowalko Posts: 2Questions: 0Answers: 0
    Than you very much .... works like a charm :)
This discussion has been closed.