using bStateSave is causing oSettings.aaSorting to have incorrect value.
using bStateSave is causing oSettings.aaSorting to have incorrect value.
hamid_numjew
Posts: 2Questions: 0Answers: 0
Hi
My datatable consists of 5 columns and many rows. I have created my table with the correct way of using thead, tr and th below:
[code]
headers1
headers2
headers3
headers4
headers5
................my data..............
................my data..............
................my data..............
......
some footer data1
some footer data2
some footer data3
some footer data4
some footer data5
[/code]
and here how i initialised my dataTable
[code]
jQuery(document).ready(function() {
var oTable = jQuery('#example').dataTable({
bStateSave: true,
bJQueryUI : true,
bPaginate : true,
sPaginationType: "full_numbers",
aLengthMenu: [[10, 20, 50, 100 , -1], [10, 20, 50, 100, "All"]],
iDisplayLength: 20,
bProcessing: true,
"aaSorting": [[0, 'asc']],
bInfo : false
});
} );
[/code]
My problem is, if I use the above in a single html page everything is fine and I don't get any errors. BUT if I use the above data in a jsp page along with other javascript files, I get the following error.
[code]
oColumn is undefined
for ( j=0, jLen=oColumn.asSorting.length ; j
My datatable consists of 5 columns and many rows. I have created my table with the correct way of using thead, tr and th below:
[code]
headers1
headers2
headers3
headers4
headers5
................my data..............
................my data..............
................my data..............
......
some footer data1
some footer data2
some footer data3
some footer data4
some footer data5
[/code]
and here how i initialised my dataTable
[code]
jQuery(document).ready(function() {
var oTable = jQuery('#example').dataTable({
bStateSave: true,
bJQueryUI : true,
bPaginate : true,
sPaginationType: "full_numbers",
aLengthMenu: [[10, 20, 50, 100 , -1], [10, 20, 50, 100, "All"]],
iDisplayLength: 20,
bProcessing: true,
"aaSorting": [[0, 'asc']],
bInfo : false
});
} );
[/code]
My problem is, if I use the above in a single html page everything is fine and I don't get any errors. BUT if I use the above data in a jsp page along with other javascript files, I get the following error.
[code]
oColumn is undefined
for ( j=0, jLen=oColumn.asSorting.length ; j
This discussion has been closed.
Replies
Any solution or workaround?
As you can see in this example, state saving of aaSorting should work just fine: http://datatables.net/release-datatables/examples/basic_init/state_save.html
Allan