Datatable error with more than 8 columns
Datatable error with more than 8 columns
jove
Posts: 3Questions: 1Answers: 0
I have a Datatable that when I add more than eight columns it won't render. I am using post on an ajax request and pushing the data to the Datatable. Here is my javascript. I can set a breakpoint and see that I have the data, but it will not render. It does as soon as I remove any of the displayed columns.
Thanks for any help
function loadAll(dataset)
{
var allTable = $('#dataTables-all').DataTable({
dom: 'ftIlp',
buttons: [
'excel'
],
oLanguage: {
"sZeroRecords": "",
"sSearch": "Filter... ",
"sProcessing": "",
"sLoadingRecords": '<img src=\"assets/img/spinners/spinner_24.gif\"></img>',
"emptyTable": ''
},
iDisplayLength: 50,
data: dataset.aaData,
scrollX: true,
bSortClasses: false,
bStateSave: false,
bPaginate: true,
bAutoWidth: false,
bProcessing: false,
bServerSide: false,
bDestroy: true,
order: [],
bJQueryUI: true,
deferRender: true,
sPaginationType: 'full_numbers',
bDeferRender: true,
columns: [
{
data: 1,
defaultContent: '<i>Not set</i>'
},
{
data: 1,
defaultContent: '<i>Not set</i>',
render: function (data, type, full, meta) {
}
},
{
data: 4,
defaultContent: '<i>Not set</i>',
},
{
data: 5,
defaultContent: '<i>Not set</i>',
},
{
data: 2,
defaultContent: '<i>Not set</i>'
},
{
data: 3,
defaultContent: "<i>Not set</i>"
},
{
data: 6,
defaultContent: "<i>Not set</i>",
className: "alnright"
},
{
data: 7,
defaultContent: "",
render: function (data, type, full, meta) { return new Date(data).toLocaleDateString(); }
},
{
data: 8,
defaultContent: "<i>Not set</i>",
render: function (data, type, full, meta) { return new Date(data).toLocaleDateString(); }
},
{
data: 20,
visible: false
},
{
data: 24,
visible: false,
render: function (data, type, full, meta)
{
if (full[24] == 'True') {
return 'Done';
}
if (full[25] == 'True') {
return 'Done';
}
return 'In Progress';
}
}
]
});
}
This discussion has been closed.
Answers
Are you seeing any console errors?
You can probably start by posting collecting info from the debugger but troubleshooting may require looking at the actual problem.
Kevin
Thanks Kevin,
I have tried running the debugger but am not sure where to access the results?
When you run it you should get a pop up that has a
view
link. Click that link and paste the URL into this thread.Do you get the pop up?
Kevin
Hi Kevin,
I did, finally. Thank you. Because of the sensitive data, I do not want to post the url. I have purchased a priority support package and will wait for that. I appreciate your responses.
@jove - I've just replied back to your e-mail.
Regards,
Allan
i had an issue seemed, i solved it changing the type of method send from get to post