DataTables:TypeError:我是未定义的 [英] DataTables: TypeError: i is undefined
问题描述
我有一张如下表格:
表格为rowspans,因为对于某些用户,我需要2行(就像你在'D'列看到的那样)
我试图使用数据表:
< table class =table table-bordered table-hover table-stripedid =myTable>
(...)
< / table>
我在代码开始时调用它:
< script>
$(document).ready(function(){
$('#myTable')。DataTable();
});
< / script>
但我有这个错误:
TypeError:i未定义
表格不像数据表类型!
也许它不适用于rowspans?
任何想法
jQuery DataTables插件不支持 ROWSPAN
属性。然而,jQuery DataTables有一个 RowsGroup 插件,它们将单元格分组在一起,使它们看起来像是使用ROWSPAN
属性。
请参阅这个例子用于代码和演示。
请参阅 jQuery DataTables - RODSPAN在表体TBODY 获取更多详细信息。
I have a table like the following
the table as rowspans because for some users I need to have 2 lines (Like you see at column 'D')
I am trying to use datatables:
<table class="table table-bordered table-hover table-striped" id="myTable">
(...)
</table>
And I call this at the begining of the code:
<script>
$( document ).ready(function() {
$('#myTable').DataTable();
});
</script>
But I have this error:
TypeError: i is undefined
And the table is not like a datatable type!
Maybe it doesn't work with rowspans? Any idea??
jQuery DataTables plug-in doesn't support ROWSPAN
attribute by default. However there is a RowsGroup plugin for jQuery DataTables that groups cells together to make them look like as if ROWSPAN
attribute is used.
See this example for code and demonstration.
See jQuery DataTables – ROWSPAN in table body TBODY for more details.
这篇关于DataTables:TypeError:我是未定义的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!