Datatables TypeError: c is undefined

后端 未结 9 1418
[愿得一人]
[愿得一人] 2020-12-03 09:20

I try to use jQuery DataTables but I get the error

TypeError: c is undefined

I don\'t know what is wrong with my code as I can s

9条回答
  •  醉话见心
    2020-12-03 10:24

    Sometime, This type issue arrives by fixing mismatched / unequal columns with HTML and datatables columns.

    "columns": [
            null,
            null,
            null,
            {"orderable": false, "width":"2%"},
        ],
    

    Above javascript defined 4 columns and HTML having 5 columns

    
       A
       B
       C
       D
       E
    
    

    Hence you will have to fix / equal both side HTMl and Datatable configuration.

    "columns": [
            null,
            null,
            null,
            null, //Added New
            {"orderable": false, "width":"2%"},
        ],
    

提交回复
热议问题