DataTable插件报错:Uncaught TypeError: Cannot read property 'style' of undefined

原因:table 中定义的列和aoColumns数据表的项数量对不上:比如下面:
<table class="table dataTable ">
<thead>
<tr>
<th>列1</th>
<th>列2</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
 
"aoColumns": [
{
"mDataProp": "uuid",
"sDefaultContent": "",
"fnRender": function (obj) {
var sReturn = "<input type='checkbox' name='check' value='" + obj.aData.uuid + "' />";
return sReturn;
}
},
{
"mDataProp": "warehouseName",
"sDefaultContent": "",
"sTitle": "<aebiz:showTitle titleId="productsuresalestock.m.warehouseName"/>"
},
{
"mDataProp": "warehouseNo",
"sDefaultContent": "",
"sTitle": "<aebiz:showTitle titleId="productsuresalestock.m.warehouseNo"/>"
}]

DataTable插件报错:Uncaught TypeError: Cannot read property 'style' of undefined的更多相关文章

  1. js 报错 Uncaught TypeError: Cannot read property 'trim' of undefined

    jquery Uncaught TypeError: Cannot read property 'trim' of undefined 报错原因及解决方案 $.trim() 函数用于去除字符串两端的空 ...

  2. Vue 组件封装发布到npm 报错 Uncaught TypeError: Cannot read property 'toLowerCase' of undefined

    Uncaught TypeError: Cannot read property 'toLowerCase' of undefined 原因是 没有导出 export default { name:& ...

  3. easyui Datagrid查询报错Uncaught TypeError:Cannot read property 'length' of undefined

    1.问题描述 easyui中datagrid执行loadData方法出现如下异常:Cannot read property 'length' of undefined 2.一开始怀疑是js或者页面的问 ...

  4. 报错: Uncaught TypeError: Cannot read property 'prototype' of undefined(Day_43)

    报错原因 引入的js顺序错误,elementUI需要依赖于Vue,调整顺序即可. 调整后

  5. Datatable报错Uncaught TypeError: Cannot read property 'cell' of undefined

    使用Datatables时,报出错误 仔细想想,是因为我在columns里加入了id,并设置visible:false 但是却没在下面的HTML部分多加一个 th 虽然我觉得因为id是隐藏的,不用加上 ...

  6. vue项目使用echarts按需引入实现地图动态显示效果时,报错:TypeError: Cannot read property 'dataToPoint' of undefined

    vue项目使用echarts按需引入实现地图动态显示效果时,报错:TypeError: Cannot read property 'dataToPoint' of undefined 借鉴了该大神的文 ...

  7. 前台报错:Uncaught TypeError: Cannot read property '0' of null

    错误现象: var div1=mycss[0].style.backgroundColor;  //这一行提示360和chrome提示:Uncaught TypeError: Cannot read  ...

  8. vue报错 Uncaught TypeError: Cannot read property ‘children ’ of null

    Uncaught TypeError: Cannot read property ‘children ’ of null ratings未渲染完毕,就跳走goods了,取消默认跳转,即可

  9. vue报错 Uncaught TypeError: Cannot read property of null

    有可能是点击a标签,但是a标签有click事件,未阻止默认事件导致报错,开始都看不出来是什么错误

随机推荐

  1. php.ini 开发和线上配置的差异

    比对了一下php自带的php.ini-development和php.ini-production,备忘. display_errors = Ondisplay_startup_errors = On ...

  2. Docker中使用redis

    项目中频繁使用Redis,为了不用每次打开Redis目录去启动Redis想到了Docker可以作为Redis的容器 直接下载使用就行 把Docker使用Redis的过程分享下:   1.     拉取 ...

  3. 在iPhone手机上写了input type="date" 显示不出来的原因

    在iPhone手机上写了input type="date" 显示不出来的原因 今天在手机页面上使用新的input类型,这样子写,在chrome浏览器上浏览,很好,显示出来.然后用i ...

  4. gitlab的fork及源项目的同步

    此篇大部分貌似是cp其他地方的,也忘了出处,写到此处,权当保存,见谅. 测试代码master同步到生产代码master   #现有git@gitlab.home.com:root/fork.git项目 ...

  5. Sping boot和mybatis整合

    在没有配置数据库时,注释这样@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) 接下来我们DataSourceA ...

  6. cf954H

    挖我自闭了这是什么东西啊. 给出一棵深度为  的树,其中深度为  的节点有  个儿子.问树上的简单路径中长度在  之间的每个有多少条.  表示对于在  层的  个节点,向下走  步的方案数  表示对于 ...

  7. Angel - 模拟Kafka数据流调试FTRL的方法

    Angel - 模拟Kafka数据流调试FTRL的方法 Mac或者Linux版本(Win10的Linux子系统同样适用) 创建一个目录用来安装kafka以及zookeeper等相关软件,比如,新建一个 ...

  8. windows系统dos下查看无线网密码

    (1)采用命令:netsh wlan show profiles 查看电脑连接过的无线网: (2)采用命令:netsh wlan show profile name ="wifi 名字&qu ...

  9. 页面初始化document.body.clientWidth大小变化

    目前:原因不明 初步判断:设置字体大小前图片加载失败! 结果:等待验证

  10. Luogu 1068 - 分数线划定 - [快速排序]

    题目链接:https://www.luogu.org/problemnew/show/P1068 题目描述世博会志愿者的选拔工作正在 A 市如火如荼的进行.为了选拔最合适的人才,A 市对所有报名的选手 ...