adding sWidth causing 'Uncaught TypeError: Object [object Object] has no method 'charCodeAt'
adding sWidth causing 'Uncaught TypeError: Object [object Object] has no method 'charCodeAt'
Hi,
I'm trying to add the sWidth parameter, but no matter where I try to put it (aoColumnDefs or aoColumns) I'm getting : Uncaught TypeError: Object [object Object] has no method 'charCodeAt'
Here is my init code :
[code]
rfTable = $('.data-table').dataTable( {
"aaSorting": [[ 0, "desc" ]],
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aoColumns": [
{ "mData": "dateCreated", "sWidth": "5%" },
{ "mData": "name", sDefaultContent: "" },
{ "mData": "email", sDefaultContent: "" },
],
"bProcessing": true,
"bServerSide": true,
"bPaginate":true,
"fnServerData": fnDataTablesPipeline,
"sAjaxSource": "/userManagement/admin/search2",
"sServerMethod": "POST"
} );
[/code]
This sample has same effect :
[code]
rfTable = $('.data-table').dataTable( {
"aaSorting": [[ 0, "desc" ]],
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aoColumnDefs": [
{ "sWidth": "20%", "aTargets": [ 0 ] }
],
"aoColumns": [
{ "mData": "dateCreated"},
{ "mData": "name", sDefaultContent: "" },
{ "mData": "email", sDefaultContent: "" },
],
"bProcessing": true,
"bServerSide": true,
"bPaginate":true,
"fnServerData": fnDataTablesPipeline,
"sAjaxSource": "/userManagement/admin/search2",
"sServerMethod": "POST"
} );
[/code]
I'm trying to add the sWidth parameter, but no matter where I try to put it (aoColumnDefs or aoColumns) I'm getting : Uncaught TypeError: Object [object Object] has no method 'charCodeAt'
Here is my init code :
[code]
rfTable = $('.data-table').dataTable( {
"aaSorting": [[ 0, "desc" ]],
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aoColumns": [
{ "mData": "dateCreated", "sWidth": "5%" },
{ "mData": "name", sDefaultContent: "" },
{ "mData": "email", sDefaultContent: "" },
],
"bProcessing": true,
"bServerSide": true,
"bPaginate":true,
"fnServerData": fnDataTablesPipeline,
"sAjaxSource": "/userManagement/admin/search2",
"sServerMethod": "POST"
} );
[/code]
This sample has same effect :
[code]
rfTable = $('.data-table').dataTable( {
"aaSorting": [[ 0, "desc" ]],
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"aoColumnDefs": [
{ "sWidth": "20%", "aTargets": [ 0 ] }
],
"aoColumns": [
{ "mData": "dateCreated"},
{ "mData": "name", sDefaultContent: "" },
{ "mData": "email", sDefaultContent: "" },
],
"bProcessing": true,
"bServerSide": true,
"bPaginate":true,
"fnServerData": fnDataTablesPipeline,
"sAjaxSource": "/userManagement/admin/search2",
"sServerMethod": "POST"
} );
[/code]
This discussion has been closed.
Replies
The error is situated in line : 3879 in datatables.js (not minified)
Allan
Thanks
Allan