DataTables: Cannot read property style of undefined

前端 未结 11 768
时光取名叫无心
时光取名叫无心 2020-12-23 15:42

I am getting this error with the following:

jquery.dataTables.js:4089 Uncaught TypeError: Cannot read property \'style\' of undefined(…)
_fnCalculateColumnWi         


        
11条回答
  •  臣服心动
    2020-12-23 16:06

    POSSIBLE CAUSES

    • Number of th elements in the table header or footer differs from number of columns in the table body or defined using columns option.
    • Attribute colspan is used for th element in the table header.
    • Incorrect column index specified in columnDefs.targets option.

    SOLUTIONS

    • Make sure that number of th elements in the table header or footer matches number of columns defined in the columns option.
    • If you use colspan attribute in the table header, make sure you have at least two header rows and one unique th element for each column. See Complex header for more information.
    • If you use columnDefs.targets option, make sure that zero-based column index refers to existing columns.

    LINKS

    See jQuery DataTables: Common JavaScript console errors - TypeError: Cannot read property ‘style’ of undefined for more information.

提交回复
热议问题