jQuery Datatables column count error - Requested unknown parameter '0' for row 0, column 0
This is a very common question, I'm aware. But I spent almost a day because I can't spot the error I have to post this. Can anyone see a mistake?
Markup :-
<table class="table align-items-center table-flush py-3" id="inquiry-select-table">
<thead class="thead-light">
<tr>
<th scope="col" style="display:none">ID</th>
<th scope="col" style="display:none">Version</th>
<th scope="col" style="display:none">Created Date</th>
<th scope="col" style="display:none">Created Time</th>
<th scope="col" style="display:none">Updated Date</th>
<th scope="col" style="display:none">Updated Time</th>
<th scope="col" style="display:none">Client ID</th>
<th scope="col">Client Name</th>
<th scope="col">Knowledge Source</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
JS :-
var inquirySelectTable;
var inquirySelectTableColumns = [{
data: "id"
},
{
data: "version"
},
{
data: "createdDate"
},
{
data: "createdTime"
},
{
data: "updatedDate"
},
{
data: "updatedTime"
},
{
data: "clientId"
},
{
data: "clientName",
defaultContent: "",
className: "all"
},
{
data: "knowledgeSource",
defaultContent: "",
className: "all",
render: function (data, type, row) {
switch (data) {
case 'WOM':
return 'Word of mouth';
case 'PAPER':
return 'Paper Article';
case 'FB':
return 'Facebook';
case 'GOOGLE':
return 'Google Ad';
case 'EMAIL':
return 'Email';
case 'SMS':
return 'SMS';
default:
return 'Other'
}
}
},
{
data: "description",
defaultContent: "",
className: "all"
}
];
var inquiryColumnDefs = [{
"targets": [0, 1, 2, 3, 4, 5, 6],
"visible": false,
"searchable": false
}];
var tableSizeFromFive = [
[5, 10, 15, 25 - 1],
[5, 10, 15, 25, "All"]
];
$(document).ready(function () {
inquirySelectTable = $('#inquiry-select-table').DataTable({
pagingType: "numbers",
responsive: true,
lengthMenu: tableSizeFromFive,
columnDefs: inquirySelectTableColumns,
columns: inquiryColumnDefs,
});
$.get("inquiries/getAllInquiries", function (data, status) {
console.log(data);
setGridData(inquirySelectTable, data);
});
});
function setGridData(table, data) {
table.clear();
table.rows.add(data).draw();
if (table.data().count() > 0) {
$(".table-responsive").removeClass("disabled");
} else {
$(".table-responsive").addClass("disabled");
}
}
The data received from the server :-
The error I'm getting is :-
According to https://datatables.net/manual/tech-notes/4, since I'm getting an Integer as the parameter it means the column count does not match with the row count. But it seems ok to me. Does anyone see something I missed?
datatables
|
show 1 more comment
This is a very common question, I'm aware. But I spent almost a day because I can't spot the error I have to post this. Can anyone see a mistake?
Markup :-
<table class="table align-items-center table-flush py-3" id="inquiry-select-table">
<thead class="thead-light">
<tr>
<th scope="col" style="display:none">ID</th>
<th scope="col" style="display:none">Version</th>
<th scope="col" style="display:none">Created Date</th>
<th scope="col" style="display:none">Created Time</th>
<th scope="col" style="display:none">Updated Date</th>
<th scope="col" style="display:none">Updated Time</th>
<th scope="col" style="display:none">Client ID</th>
<th scope="col">Client Name</th>
<th scope="col">Knowledge Source</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
JS :-
var inquirySelectTable;
var inquirySelectTableColumns = [{
data: "id"
},
{
data: "version"
},
{
data: "createdDate"
},
{
data: "createdTime"
},
{
data: "updatedDate"
},
{
data: "updatedTime"
},
{
data: "clientId"
},
{
data: "clientName",
defaultContent: "",
className: "all"
},
{
data: "knowledgeSource",
defaultContent: "",
className: "all",
render: function (data, type, row) {
switch (data) {
case 'WOM':
return 'Word of mouth';
case 'PAPER':
return 'Paper Article';
case 'FB':
return 'Facebook';
case 'GOOGLE':
return 'Google Ad';
case 'EMAIL':
return 'Email';
case 'SMS':
return 'SMS';
default:
return 'Other'
}
}
},
{
data: "description",
defaultContent: "",
className: "all"
}
];
var inquiryColumnDefs = [{
"targets": [0, 1, 2, 3, 4, 5, 6],
"visible": false,
"searchable": false
}];
var tableSizeFromFive = [
[5, 10, 15, 25 - 1],
[5, 10, 15, 25, "All"]
];
$(document).ready(function () {
inquirySelectTable = $('#inquiry-select-table').DataTable({
pagingType: "numbers",
responsive: true,
lengthMenu: tableSizeFromFive,
columnDefs: inquirySelectTableColumns,
columns: inquiryColumnDefs,
});
$.get("inquiries/getAllInquiries", function (data, status) {
console.log(data);
setGridData(inquirySelectTable, data);
});
});
function setGridData(table, data) {
table.clear();
table.rows.add(data).draw();
if (table.data().count() > 0) {
$(".table-responsive").removeClass("disabled");
} else {
$(".table-responsive").addClass("disabled");
}
}
The data received from the server :-
The error I'm getting is :-
According to https://datatables.net/manual/tech-notes/4, since I'm getting an Integer as the parameter it means the column count does not match with the row count. But it seems ok to me. Does anyone see something I missed?
datatables
Just taking a shot here but possibly this:var inquiryColumnDefs = [{ "targets": [0, 1, 2, 3, 4, 5, 6], --This line right here, would explain it sayin unknown parameter 0 for row 0, column 0 "visible": false, "searchable": false }];
It would seem that targets: is expecting yourinquirySelectTableColumns
array values.
– Ryan Wilson
Nov 19 '18 at 17:51
@RyanWilson Actually I'm using the same column definitions ("visible": false, "searchable": false for 6 columns) for other data tables also and they work fine. And I just commented those 3 lines after you mentioned but the issue is still there.
– Praveen Fernando
Nov 19 '18 at 18:00
Sorry then, I have nothing more to offer at this time.
– Ryan Wilson
Nov 19 '18 at 18:04
Same as I :) Thanks for trying, mate
– Praveen Fernando
Nov 19 '18 at 18:06
It could be because you have less columns listed in targets: than you do in your table headers, see documentation for this error here (datatables.net/manual/tech-notes/4) Specific section text from linked documentationThe number of cells in the table does not satisfy the equation #cells = #columns * #rows (i.e. there are more columns defined in the header than in the table body, or vice-versa).
– Ryan Wilson
Nov 19 '18 at 18:10
|
show 1 more comment
This is a very common question, I'm aware. But I spent almost a day because I can't spot the error I have to post this. Can anyone see a mistake?
Markup :-
<table class="table align-items-center table-flush py-3" id="inquiry-select-table">
<thead class="thead-light">
<tr>
<th scope="col" style="display:none">ID</th>
<th scope="col" style="display:none">Version</th>
<th scope="col" style="display:none">Created Date</th>
<th scope="col" style="display:none">Created Time</th>
<th scope="col" style="display:none">Updated Date</th>
<th scope="col" style="display:none">Updated Time</th>
<th scope="col" style="display:none">Client ID</th>
<th scope="col">Client Name</th>
<th scope="col">Knowledge Source</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
JS :-
var inquirySelectTable;
var inquirySelectTableColumns = [{
data: "id"
},
{
data: "version"
},
{
data: "createdDate"
},
{
data: "createdTime"
},
{
data: "updatedDate"
},
{
data: "updatedTime"
},
{
data: "clientId"
},
{
data: "clientName",
defaultContent: "",
className: "all"
},
{
data: "knowledgeSource",
defaultContent: "",
className: "all",
render: function (data, type, row) {
switch (data) {
case 'WOM':
return 'Word of mouth';
case 'PAPER':
return 'Paper Article';
case 'FB':
return 'Facebook';
case 'GOOGLE':
return 'Google Ad';
case 'EMAIL':
return 'Email';
case 'SMS':
return 'SMS';
default:
return 'Other'
}
}
},
{
data: "description",
defaultContent: "",
className: "all"
}
];
var inquiryColumnDefs = [{
"targets": [0, 1, 2, 3, 4, 5, 6],
"visible": false,
"searchable": false
}];
var tableSizeFromFive = [
[5, 10, 15, 25 - 1],
[5, 10, 15, 25, "All"]
];
$(document).ready(function () {
inquirySelectTable = $('#inquiry-select-table').DataTable({
pagingType: "numbers",
responsive: true,
lengthMenu: tableSizeFromFive,
columnDefs: inquirySelectTableColumns,
columns: inquiryColumnDefs,
});
$.get("inquiries/getAllInquiries", function (data, status) {
console.log(data);
setGridData(inquirySelectTable, data);
});
});
function setGridData(table, data) {
table.clear();
table.rows.add(data).draw();
if (table.data().count() > 0) {
$(".table-responsive").removeClass("disabled");
} else {
$(".table-responsive").addClass("disabled");
}
}
The data received from the server :-
The error I'm getting is :-
According to https://datatables.net/manual/tech-notes/4, since I'm getting an Integer as the parameter it means the column count does not match with the row count. But it seems ok to me. Does anyone see something I missed?
datatables
This is a very common question, I'm aware. But I spent almost a day because I can't spot the error I have to post this. Can anyone see a mistake?
Markup :-
<table class="table align-items-center table-flush py-3" id="inquiry-select-table">
<thead class="thead-light">
<tr>
<th scope="col" style="display:none">ID</th>
<th scope="col" style="display:none">Version</th>
<th scope="col" style="display:none">Created Date</th>
<th scope="col" style="display:none">Created Time</th>
<th scope="col" style="display:none">Updated Date</th>
<th scope="col" style="display:none">Updated Time</th>
<th scope="col" style="display:none">Client ID</th>
<th scope="col">Client Name</th>
<th scope="col">Knowledge Source</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
JS :-
var inquirySelectTable;
var inquirySelectTableColumns = [{
data: "id"
},
{
data: "version"
},
{
data: "createdDate"
},
{
data: "createdTime"
},
{
data: "updatedDate"
},
{
data: "updatedTime"
},
{
data: "clientId"
},
{
data: "clientName",
defaultContent: "",
className: "all"
},
{
data: "knowledgeSource",
defaultContent: "",
className: "all",
render: function (data, type, row) {
switch (data) {
case 'WOM':
return 'Word of mouth';
case 'PAPER':
return 'Paper Article';
case 'FB':
return 'Facebook';
case 'GOOGLE':
return 'Google Ad';
case 'EMAIL':
return 'Email';
case 'SMS':
return 'SMS';
default:
return 'Other'
}
}
},
{
data: "description",
defaultContent: "",
className: "all"
}
];
var inquiryColumnDefs = [{
"targets": [0, 1, 2, 3, 4, 5, 6],
"visible": false,
"searchable": false
}];
var tableSizeFromFive = [
[5, 10, 15, 25 - 1],
[5, 10, 15, 25, "All"]
];
$(document).ready(function () {
inquirySelectTable = $('#inquiry-select-table').DataTable({
pagingType: "numbers",
responsive: true,
lengthMenu: tableSizeFromFive,
columnDefs: inquirySelectTableColumns,
columns: inquiryColumnDefs,
});
$.get("inquiries/getAllInquiries", function (data, status) {
console.log(data);
setGridData(inquirySelectTable, data);
});
});
function setGridData(table, data) {
table.clear();
table.rows.add(data).draw();
if (table.data().count() > 0) {
$(".table-responsive").removeClass("disabled");
} else {
$(".table-responsive").addClass("disabled");
}
}
The data received from the server :-
The error I'm getting is :-
According to https://datatables.net/manual/tech-notes/4, since I'm getting an Integer as the parameter it means the column count does not match with the row count. But it seems ok to me. Does anyone see something I missed?
datatables
datatables
asked Nov 19 '18 at 17:43


Praveen FernandoPraveen Fernando
998
998
Just taking a shot here but possibly this:var inquiryColumnDefs = [{ "targets": [0, 1, 2, 3, 4, 5, 6], --This line right here, would explain it sayin unknown parameter 0 for row 0, column 0 "visible": false, "searchable": false }];
It would seem that targets: is expecting yourinquirySelectTableColumns
array values.
– Ryan Wilson
Nov 19 '18 at 17:51
@RyanWilson Actually I'm using the same column definitions ("visible": false, "searchable": false for 6 columns) for other data tables also and they work fine. And I just commented those 3 lines after you mentioned but the issue is still there.
– Praveen Fernando
Nov 19 '18 at 18:00
Sorry then, I have nothing more to offer at this time.
– Ryan Wilson
Nov 19 '18 at 18:04
Same as I :) Thanks for trying, mate
– Praveen Fernando
Nov 19 '18 at 18:06
It could be because you have less columns listed in targets: than you do in your table headers, see documentation for this error here (datatables.net/manual/tech-notes/4) Specific section text from linked documentationThe number of cells in the table does not satisfy the equation #cells = #columns * #rows (i.e. there are more columns defined in the header than in the table body, or vice-versa).
– Ryan Wilson
Nov 19 '18 at 18:10
|
show 1 more comment
Just taking a shot here but possibly this:var inquiryColumnDefs = [{ "targets": [0, 1, 2, 3, 4, 5, 6], --This line right here, would explain it sayin unknown parameter 0 for row 0, column 0 "visible": false, "searchable": false }];
It would seem that targets: is expecting yourinquirySelectTableColumns
array values.
– Ryan Wilson
Nov 19 '18 at 17:51
@RyanWilson Actually I'm using the same column definitions ("visible": false, "searchable": false for 6 columns) for other data tables also and they work fine. And I just commented those 3 lines after you mentioned but the issue is still there.
– Praveen Fernando
Nov 19 '18 at 18:00
Sorry then, I have nothing more to offer at this time.
– Ryan Wilson
Nov 19 '18 at 18:04
Same as I :) Thanks for trying, mate
– Praveen Fernando
Nov 19 '18 at 18:06
It could be because you have less columns listed in targets: than you do in your table headers, see documentation for this error here (datatables.net/manual/tech-notes/4) Specific section text from linked documentationThe number of cells in the table does not satisfy the equation #cells = #columns * #rows (i.e. there are more columns defined in the header than in the table body, or vice-versa).
– Ryan Wilson
Nov 19 '18 at 18:10
Just taking a shot here but possibly this:
var inquiryColumnDefs = [{ "targets": [0, 1, 2, 3, 4, 5, 6], --This line right here, would explain it sayin unknown parameter 0 for row 0, column 0 "visible": false, "searchable": false }];
It would seem that targets: is expecting your inquirySelectTableColumns
array values.– Ryan Wilson
Nov 19 '18 at 17:51
Just taking a shot here but possibly this:
var inquiryColumnDefs = [{ "targets": [0, 1, 2, 3, 4, 5, 6], --This line right here, would explain it sayin unknown parameter 0 for row 0, column 0 "visible": false, "searchable": false }];
It would seem that targets: is expecting your inquirySelectTableColumns
array values.– Ryan Wilson
Nov 19 '18 at 17:51
@RyanWilson Actually I'm using the same column definitions ("visible": false, "searchable": false for 6 columns) for other data tables also and they work fine. And I just commented those 3 lines after you mentioned but the issue is still there.
– Praveen Fernando
Nov 19 '18 at 18:00
@RyanWilson Actually I'm using the same column definitions ("visible": false, "searchable": false for 6 columns) for other data tables also and they work fine. And I just commented those 3 lines after you mentioned but the issue is still there.
– Praveen Fernando
Nov 19 '18 at 18:00
Sorry then, I have nothing more to offer at this time.
– Ryan Wilson
Nov 19 '18 at 18:04
Sorry then, I have nothing more to offer at this time.
– Ryan Wilson
Nov 19 '18 at 18:04
Same as I :) Thanks for trying, mate
– Praveen Fernando
Nov 19 '18 at 18:06
Same as I :) Thanks for trying, mate
– Praveen Fernando
Nov 19 '18 at 18:06
It could be because you have less columns listed in targets: than you do in your table headers, see documentation for this error here (datatables.net/manual/tech-notes/4) Specific section text from linked documentation
The number of cells in the table does not satisfy the equation #cells = #columns * #rows (i.e. there are more columns defined in the header than in the table body, or vice-versa).
– Ryan Wilson
Nov 19 '18 at 18:10
It could be because you have less columns listed in targets: than you do in your table headers, see documentation for this error here (datatables.net/manual/tech-notes/4) Specific section text from linked documentation
The number of cells in the table does not satisfy the equation #cells = #columns * #rows (i.e. there are more columns defined in the header than in the table body, or vice-versa).
– Ryan Wilson
Nov 19 '18 at 18:10
|
show 1 more comment
1 Answer
1
active
oldest
votes
Seems like you've swapped columnDefs
and columns
:
columnDefs: inquirySelectTableColumns,
columns: inquiryColumnDefs,
Interchange them and it'll work fine:
columnDefs: inquiryColumnDefs,
columns: inquirySelectTableColumns,
Example fork:
http://jsfiddle.net/bsf69o04/
Thank you. It worked! I can't believe I spent almost a day with my eyes closed like this.
– Praveen Fernando
Nov 20 '18 at 5:19
No problem. Yeah, it happens. A fresh set of eyes did the trick. Happy coding!
– Shashank
Nov 20 '18 at 14:15
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53380032%2fjquery-datatables-column-count-error-requested-unknown-parameter-0-for-row-0%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Seems like you've swapped columnDefs
and columns
:
columnDefs: inquirySelectTableColumns,
columns: inquiryColumnDefs,
Interchange them and it'll work fine:
columnDefs: inquiryColumnDefs,
columns: inquirySelectTableColumns,
Example fork:
http://jsfiddle.net/bsf69o04/
Thank you. It worked! I can't believe I spent almost a day with my eyes closed like this.
– Praveen Fernando
Nov 20 '18 at 5:19
No problem. Yeah, it happens. A fresh set of eyes did the trick. Happy coding!
– Shashank
Nov 20 '18 at 14:15
add a comment |
Seems like you've swapped columnDefs
and columns
:
columnDefs: inquirySelectTableColumns,
columns: inquiryColumnDefs,
Interchange them and it'll work fine:
columnDefs: inquiryColumnDefs,
columns: inquirySelectTableColumns,
Example fork:
http://jsfiddle.net/bsf69o04/
Thank you. It worked! I can't believe I spent almost a day with my eyes closed like this.
– Praveen Fernando
Nov 20 '18 at 5:19
No problem. Yeah, it happens. A fresh set of eyes did the trick. Happy coding!
– Shashank
Nov 20 '18 at 14:15
add a comment |
Seems like you've swapped columnDefs
and columns
:
columnDefs: inquirySelectTableColumns,
columns: inquiryColumnDefs,
Interchange them and it'll work fine:
columnDefs: inquiryColumnDefs,
columns: inquirySelectTableColumns,
Example fork:
http://jsfiddle.net/bsf69o04/
Seems like you've swapped columnDefs
and columns
:
columnDefs: inquirySelectTableColumns,
columns: inquiryColumnDefs,
Interchange them and it'll work fine:
columnDefs: inquiryColumnDefs,
columns: inquirySelectTableColumns,
Example fork:
http://jsfiddle.net/bsf69o04/
answered Nov 19 '18 at 21:31
ShashankShashank
4,6551512
4,6551512
Thank you. It worked! I can't believe I spent almost a day with my eyes closed like this.
– Praveen Fernando
Nov 20 '18 at 5:19
No problem. Yeah, it happens. A fresh set of eyes did the trick. Happy coding!
– Shashank
Nov 20 '18 at 14:15
add a comment |
Thank you. It worked! I can't believe I spent almost a day with my eyes closed like this.
– Praveen Fernando
Nov 20 '18 at 5:19
No problem. Yeah, it happens. A fresh set of eyes did the trick. Happy coding!
– Shashank
Nov 20 '18 at 14:15
Thank you. It worked! I can't believe I spent almost a day with my eyes closed like this.
– Praveen Fernando
Nov 20 '18 at 5:19
Thank you. It worked! I can't believe I spent almost a day with my eyes closed like this.
– Praveen Fernando
Nov 20 '18 at 5:19
No problem. Yeah, it happens. A fresh set of eyes did the trick. Happy coding!
– Shashank
Nov 20 '18 at 14:15
No problem. Yeah, it happens. A fresh set of eyes did the trick. Happy coding!
– Shashank
Nov 20 '18 at 14:15
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53380032%2fjquery-datatables-column-count-error-requested-unknown-parameter-0-for-row-0%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Just taking a shot here but possibly this:
var inquiryColumnDefs = [{ "targets": [0, 1, 2, 3, 4, 5, 6], --This line right here, would explain it sayin unknown parameter 0 for row 0, column 0 "visible": false, "searchable": false }];
It would seem that targets: is expecting yourinquirySelectTableColumns
array values.– Ryan Wilson
Nov 19 '18 at 17:51
@RyanWilson Actually I'm using the same column definitions ("visible": false, "searchable": false for 6 columns) for other data tables also and they work fine. And I just commented those 3 lines after you mentioned but the issue is still there.
– Praveen Fernando
Nov 19 '18 at 18:00
Sorry then, I have nothing more to offer at this time.
– Ryan Wilson
Nov 19 '18 at 18:04
Same as I :) Thanks for trying, mate
– Praveen Fernando
Nov 19 '18 at 18:06
It could be because you have less columns listed in targets: than you do in your table headers, see documentation for this error here (datatables.net/manual/tech-notes/4) Specific section text from linked documentation
The number of cells in the table does not satisfy the equation #cells = #columns * #rows (i.e. there are more columns defined in the header than in the table body, or vice-versa).
– Ryan Wilson
Nov 19 '18 at 18:10