Incorrect column count.
Incorrect column count.
Link to test case: https://codepen.io/Vicente-Blas-Lopez-Plaza/pen/jOJPVyq
Debugger code (debug.datatables.net):
Error messages shown:
jQuery.Deferred exception: o is undefined St@https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:20415
x@https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:17777
https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:17881
https://code.jquery.com/jquery-3.6.4.min.js:2:1567
map@https://code.jquery.com/jquery-3.6.4.min.js:2:3536
map@https://code.jquery.com/jquery-3.6.4.min.js:2:1535
ut@https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:17846
t@https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:8513
https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:8696
each@https://code.jquery.com/jquery-3.6.4.min.js:2:3003
each@https://code.jquery.com/jquery-3.6.4.min.js:2:1481
w@https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:3587
P.fn.DataTable@https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js:4:87065
http://localhost:5000/:40198:31
e@https://code.jquery.com/jquery-3.6.4.min.js:2:30158
https://code.jquery.com/jquery-3.6.4.min.js:2:30460
https://code.jquery.com/jquery-3.6.4.min.js:2:30669
c@https://code.jquery.com/jquery-3.6.4.min.js:2:28447
fireWith@https://code.jquery.com/jquery-3.6.4.min.js:2:29192
fire@https://code.jquery.com/jquery-3.6.4.min.js:2:29228
c@https://code.jquery.com/jquery-3.6.4.min.js:2:28447
DataTables warning: table id=resultadosTable - Incorrect column count. For more information about this error, please see https://datatables.net/tn/18
Description of problem:
I have reviewed all the documentation about this error and I cannot find the solution. The number of fields in the table header corresponds to the data fields, I am not using colspan either.
I am clear that the problem is in the <tr> rows of the "collapse" component but I can't find a way to tell datatables that that part is correct.
thanks for any help
Answers
Your codepen shows:
And nothing else.
I don't see any code to debug either there or in your message. Can you update it to an example showing the issue please.
Allan
fixed..
Thank you. Three of your rows only have a single column in then. Your header and the first row have 7 columns. The others have only 1. Hence they you are correctly getting the error message saying there is a column count mismatch. There is.
To fix make sure all rows have 7 columns.
Allan