I'm trying to get jquery.dataTables plug in to work in MVC5.
I have added everything(library and css) and included in my bundles correctly and can verify that all is there and it works by making a second table using straight html tags. That one shows and has the dataTables base functionality. But the table I am making dynamically gets the following error:

我想要jquery。在MVC5中插入dataTables。我已经添加了所有的东西(库和css),并且正确地包含在包中,并且可以通过使用直接的html标记创建第二个表来验证它们的正确性。它显示并具有dataTables基础功能。但是我动态制作的表格有以下错误:

Unhandled exception at line 669, column 8 in .../Scripts/jquery.dataTables.js
Unable to get property 'className' of undefined or null reference. 

I have verified that my table id is correct.

我已经验证了我的表id是正确的。

--Fixed

——固定

-- Not sure how this works. But I found the problem/solution accidentally. I'm going to submit this anyway in case what I found is useful.

——不知道这是怎么回事。但是我不小心发现了问题/解决方案。无论如何,我要提交这个,以防我发现有用的东西。

The THead section had one empty cell. (a <td></td> pair) that made the TBody section not match in count of # of cells. It would work by either adding another empty Body cell or removing the THead cell. Clearly these two items have to match one for one.

THead部分有一个空单元格。(a 对)使TBody部分的细胞数不匹配。它可以通过添加另一个空体单元格或删除THead单元格来工作。显然,这两项必须一一对应。

2 个解决方案

#1


1

There shouldn't be any empty <th>, enough <td> to match the number of the <th> should be added. Your solution is correct.

不应该有任何空的,足够的去匹配的个数。你的解决方案是正确的。

更多相关文章

  1. 等待执行所有ajax回调的最佳解决方案
  2. 【问题解决方案】ImportError: No module named 'pygal'
  3. Python 黏包及黏包解决方案
  4. 无法安装ndg-httpsclient或者我的解决方案错误
  5. Linux无法连接网络解决方案
  6. 嵌入式Linux要学哪些东西?你真的造吗?
  7. Media-S 简介(一个开源的DRM解决方案)
  8. Linux源码包里有个scripts文件夹,里面放的东西起什么作用?
  9. 今天看了一整天的汇编语言,真发现语言这东西只是一种思想!

随机推荐

  1. C语言标识符有哪三类
  2. strcat函数的作用是什么
  3. c语言是高级语言吗?
  4. strcpy函数的作用是什么
  5. c++引用和指针的区别是什么?
  6. scanf在c语言中的作用是什么?
  7. c语言中数据结构是什么?常见数据结构有哪
  8. 虚函数和纯虚函数的区别是什么?
  9. c语言的输入输出语句有哪些?
  10. windows.h有哪些函数