Uncaught TypeError: Cannot read property 'asSorting' of undefined
Uncaught TypeError: Cannot read property 'asSorting' of undefined
stantor195
Posts: 4Questions: 0Answers: 0
Hi, I keep getting this error and I'm not sure how to fix it. Here is the code in my html file:
[code]
$(document).ready( function () {
$('#table_id').dataTable( {
"aaSorting"= []
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
iDisplayLength: 25,
iDisplayStart: 3,
"oLanguage": {
"sZeroRecords": "There are no records that match your search criterion",
"sLengthMenu": "Display _MENU_ records per page",
"sInfo": "Displaying _START_ to _END_ of _TOTAL_ records",
"sInfoEmpty": "Showing 0 to 0 of 0 records",
"sInfoFiltered": "(filtered from _MAX_ total records)"
},
sPagination: "full_numbers",
bStateSave: true,
sScorollX: "300px",
sScrollY: "200px",
oSearch: { "sSearch": "Type here...", "bRegex": false, "bSmart": false }
} );
});
[/code]
[code]
$(document).ready( function () {
$('#table_id').dataTable( {
"aaSorting"= []
"aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
iDisplayLength: 25,
iDisplayStart: 3,
"oLanguage": {
"sZeroRecords": "There are no records that match your search criterion",
"sLengthMenu": "Display _MENU_ records per page",
"sInfo": "Displaying _START_ to _END_ of _TOTAL_ records",
"sInfoEmpty": "Showing 0 to 0 of 0 records",
"sInfoFiltered": "(filtered from _MAX_ total records)"
},
sPagination: "full_numbers",
bStateSave: true,
sScorollX: "300px",
sScrollY: "200px",
oSearch: { "sSearch": "Type here...", "bRegex": false, "bSmart": false }
} );
});
[/code]
This discussion has been closed.
Replies
[code]for ( j=0, jLen=oColumn.asSorting.length ; j
@larryweya - good to hear you found a solution tot he problem you had. With DataTables 1.9 you should be able to use TH and TD elements interchangeably with DataTables - either should work fine :-)
Allan
Allan
[code]"aaSorting": [0, 'asc'][/code]
instead of:
[code]"aaSorting": [[0, 'asc']][/code]