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


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"/>"  }]


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM