未捕获的TypeError:无法设置未定义的属性'nTf'

时间:2022-08-24 13:55:03

I am getting console error "Uncaught TypeError: Cannot set property 'nTf' of undefined". I am using jquery Datatable.

我收到控制台错误“Uncaught TypeError:无法设置未定义的属性'nTf'”。我正在使用jquery Datatable。

4 个解决方案

#1


9  

As per https://datatables.net/forums/discussion/22697/uncaught-typeerror-cannot-set-property-ntf-of-undefined you probably have more cells in the header and/or footer of your table defined in your html than you are getting back from the server.

根据https://datatables.net/forums/discussion/22697/uncaught-typeerror-cannot-set-property-ntf-of-undefined您可能在html中定义的表格的页眉和/或页脚中有更多单元格而不是从服务器回来。

At least that's the issue I was having which gave me this error message.

至少那是我遇到的问题,它给了我这个错误信息。

#2


6  

Okey Let me just to be clear for everyone , tfoot > th must be equal as your thead > th

Okey让我只为每个人清楚,tfoot> th必须与你的thead> th相等

i just faced this kind of problem recently and trying to figure it out like couple mins so just make sure in the future someone maybe be faced it

我最近刚刚遇到这种问题,并试图像几分钟一样解决这个问题,所以请确保将来有人可能面临这样的问题

#3


0  

In your table Check all colspan attribute values if its equal to the number of columns

在表中检查所有colspan属性值是否等于列数

#4


0  

I ran into this problem too. All columns in tfoot matched thead. Just a simple step of clearing browser cache did the magic for me. Hope this helps someone.

我也遇到了这个问题。 tfoot中的所有列都与thead匹配。清除浏览器缓存只是一个简单的步骤,对我来说是神奇的。希望这有助于某人。

#1


9  

As per https://datatables.net/forums/discussion/22697/uncaught-typeerror-cannot-set-property-ntf-of-undefined you probably have more cells in the header and/or footer of your table defined in your html than you are getting back from the server.

根据https://datatables.net/forums/discussion/22697/uncaught-typeerror-cannot-set-property-ntf-of-undefined您可能在html中定义的表格的页眉和/或页脚中有更多单元格而不是从服务器回来。

At least that's the issue I was having which gave me this error message.

至少那是我遇到的问题,它给了我这个错误信息。

#2


6  

Okey Let me just to be clear for everyone , tfoot > th must be equal as your thead > th

Okey让我只为每个人清楚,tfoot> th必须与你的thead> th相等

i just faced this kind of problem recently and trying to figure it out like couple mins so just make sure in the future someone maybe be faced it

我最近刚刚遇到这种问题,并试图像几分钟一样解决这个问题,所以请确保将来有人可能面临这样的问题

#3


0  

In your table Check all colspan attribute values if its equal to the number of columns

在表中检查所有colspan属性值是否等于列数

#4


0  

I ran into this problem too. All columns in tfoot matched thead. Just a simple step of clearing browser cache did the magic for me. Hope this helps someone.

我也遇到了这个问题。 tfoot中的所有列都与thead匹配。清除浏览器缓存只是一个简单的步骤,对我来说是神奇的。希望这有助于某人。