Datatable error with more than 8 columns

Datatable error with more than 8 columns

jovejove 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';
        }
    }
            ]
        });


    }

Answers

  • kthorngrenkthorngren Posts: 21,174Questions: 26Answers: 4,923

    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

  • jovejove Posts: 3Questions: 1Answers: 0

    Thanks Kevin,

    I have tried running the debugger but am not sure where to access the results?

  • kthorngrenkthorngren Posts: 21,174Questions: 26Answers: 4,923

    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

  • jovejove Posts: 3Questions: 1Answers: 0

    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.

  • allanallan Posts: 63,219Questions: 1Answers: 10,416 Site admin

    @jove - I've just replied back to your e-mail.

    Regards,
    Allan

  • cristian495cristian495 Posts: 1Questions: 0Answers: 0

    i had an issue seemed, i solved it changing the type of method send from get to post

This discussion has been closed.