aoColumnDefs error on bVisible
aoColumnDefs error on bVisible
All my codes work well.
But while initializing table with
[code]$('#myTable').dataTable(
{
"aoColumnDefs":aoColumnDefsType,
}); [/code]
If I add this:
[code]aoColumnDefsType.push({ "bVisible": false, "aTargets": [ 1 ] }); [/code]
I get this error:
[code]Uncaught TypeError: Object [object Object] has no method 'charCodeAt' [/code]
My call stack is like this:
[code] Uncaught TypeError: Object [object Object] has no method 'charCodeAt' jquery.dataTables.js:3757
_fnStringToCss jquery.dataTables.1.9.4.js:3757
_fnCalculateColumnWidths jquery.dataTables.1.9.4.js:3646
_fnInitialise jquery.dataTables.1.9.4.js:2501
(anonymous function) jquery.dataTables.1.9.4.js:6606
jQuery.extend.each jquery-1.9.1.js:648
jQuery.fn.jQuery.each jquery-1.9.1.js:270
DataTable jquery.dataTables.1.9.4.js:6168
startDatatables myjsfile.js:393
(anonymous function) myjsfile.js:120
fire jquery-1.9.1.js:1037
self.fireWith jquery-1.9.1.js:1148
jQuery.extend.ready jquery-1.9.1.js:433
completed jquery-1.9.1.js:103[/code]
What would be the error ?
But while initializing table with
[code]$('#myTable').dataTable(
{
"aoColumnDefs":aoColumnDefsType,
}); [/code]
If I add this:
[code]aoColumnDefsType.push({ "bVisible": false, "aTargets": [ 1 ] }); [/code]
I get this error:
[code]Uncaught TypeError: Object [object Object] has no method 'charCodeAt' [/code]
My call stack is like this:
[code] Uncaught TypeError: Object [object Object] has no method 'charCodeAt' jquery.dataTables.js:3757
_fnStringToCss jquery.dataTables.1.9.4.js:3757
_fnCalculateColumnWidths jquery.dataTables.1.9.4.js:3646
_fnInitialise jquery.dataTables.1.9.4.js:2501
(anonymous function) jquery.dataTables.1.9.4.js:6606
jQuery.extend.each jquery-1.9.1.js:648
jQuery.fn.jQuery.each jquery-1.9.1.js:270
DataTable jquery.dataTables.1.9.4.js:6168
startDatatables myjsfile.js:393
(anonymous function) myjsfile.js:120
fire jquery-1.9.1.js:1037
self.fireWith jquery-1.9.1.js:1148
jQuery.extend.ready jquery-1.9.1.js:433
completed jquery-1.9.1.js:103[/code]
What would be the error ?
This discussion has been closed.
Replies
[code]
function _fnStringToCss( s )
.....
3756 /* Check if the last character is not 0-9 */
3757 var c = s.charCodeAt( s.length-1 );
[/code]
Error:
[code]Uncaught TypeError: Object [object Object] has no method 'charCodeAt' [/code]
My guess is the setting of sType to an invalid option for a column, but I can't say without an example.
Allan
I found that jquery ui 1.8 conflicts somehow with datatables code.
When I use jQuery ui 1.10.3, error solved automatically.
I think there exists some conflict issue between jqueru ui 1.8, jquery 1.91 and datatables 1.9.4
Allan