Returned data sort array (col 4) is the wrong length in jquery datatable
Returned data sort array (col 4) is the wrong length in jquery datatable
emgenitors
Posts: 3Questions: 1Answers: 0
I have column which contains some empty entries .When I click on that column to sort ,it throws following exception
"Returned data sort array (col 4) is the wrong length in jquery datatable" on console
Can u please let me know How to resolve this issue??
This discussion has been closed.
Answers
Can you link to the page with the error? Or create it in JSBin so we can replicate it? Or even the JS code for your DT instance?
You need to give us something to use for debugging/troubleshooting, other than just the problem..
I have plenty of empty columns, and it sorts just fine, so im assuming this is something specific to your DT instance
Hi
Here is the code
$('#INV_ACC_DETAIL_tbl').show();
var tblCols= {"columns":[{"sTitle":"Item","mData":"col0","sType":"","width":"11%","aSortDataType":"","sClass":"left","showTotalFooter":false},{"sTitle":"Shelf Order","mData":"col1","sType":"numeric","width":"11%","sClass":"text-right","showTotalFooter":false},{"sTitle":"Quantity","mData":"col2","sType":"numeric-comma","width":"11%","aSortDataType":"dom-text","sClass":"text-right","showTotalFooter":true,"total":"35.0"},{"sTitle":"Inventory UOM","mData":"col3","sType":"","width":"11%","aSortDataType":"","sClass":"left","showTotalFooter":false},{"sTitle":"Quantity","mData":"col4","sType":"numeric-comma","width":"11%","aSortDataType":"dom-text","sClass":"text-right","showTotalFooter":true,"total":"2109.25"},{"sTitle":"Inventory UOM","mData":"col5","sType":"","width":"11%","aSortDataType":"","sClass":"left","showTotalFooter":false},{"sTitle":"Quantity","mData":"col6","sType":"numeric-comma","width":"11%","aSortDataType":"dom-text","sClass":"text-right","showTotalFooter":true,"total":"0.0"},{"sTitle":"Inventory UOM","mData":"col7","sType":"","width":"11%","aSortDataType":"","sClass":"left","showTotalFooter":false},{"sTitle":"Total Cost","mData":"col8","sType":"currency","width":"11%","sClass":"text-right","showTotalFooter":true,"dataType":"DOLLAR","total":"1969.524683333333"}],"rows":[],"isReadOnly":false};
var aoColumns=getDataTableCols(tblCols.columns);
var oTable = $('#INV_ACC_DETAIL_tbl').dataTable({
"bProcessing": false,
"bPaginate": 1,
"aoColumns": aoColumns,
"bSort":true,
"bJQueryUI": true,
"bLengthChange": 1,
"sDom": "Rl<'activeTypeIID'>frtip",
"sScrollX": "100%",
"aaSorting": [],
"bScrollCollapse": true,
"sScrollY": "350px",
$('#INV_ACC_DETAIL_tbl').show();
var tblCols= {"columns":[{"sTitle":"Item","mData":"col0","sType":"","width":"11%","aSortDataType":"","sClass":"left","showTotalFooter":false},{"sTitle":"Shelf Order","mData":"col1","sType":"numeric","width":"11%","sClass":"text-right","showTotalFooter":false},{"sTitle":"Quantity","mData":"col2","sType":"numeric-comma","width":"11%","aSortDataType":"dom-text","sClass":"text-right","showTotalFooter":true,"total":"35.0"},{"sTitle":"Inventory UOM","mData":"col3","sType":"","width":"11%","aSortDataType":"","sClass":"left","showTotalFooter":false},{"sTitle":"Quantity","mData":"col4","sType":"numeric-comma","width":"11%","aSortDataType":"dom-text","sClass":"text-right","showTotalFooter":true,"total":"2109.25"},{"sTitle":"Inventory UOM","mData":"col5","sType":"","width":"11%","aSortDataType":"","sClass":"left","showTotalFooter":false},{"sTitle":"Quantity","mData":"col6","sType":"numeric-comma","width":"11%","aSortDataType":"dom-text","sClass":"text-right","showTotalFooter":true,"total":"0.0"},{"sTitle":"Inventory UOM","mData":"col7","sType":"","width":"11%","aSortDataType":"","sClass":"left","showTotalFooter":false},{"sTitle":"Total Cost","mData":"col8","sType":"currency","width":"11%","sClass":"text-right","showTotalFooter":true,"dataType":"DOLLAR","total":"1969.524683333333"}],"rows":[],"isReadOnly":false};
var aoColumns=getDataTableCols(tblCols.columns);
var oTable = $('#INV_ACC_DETAIL_tbl').dataTable({
"bProcessing": false,
"bPaginate": 1,
"aoColumns": aoColumns,
"bSort":true,
"bJQueryUI": true,
"bLengthChange": 1,
"sDom": "Rl<'activeTypeIID'>frtip",
"sScrollX": "100%",
"aaSorting": [],
"bScrollCollapse": true,
"sScrollY": "350px",