如何解决jQuery Datatable行分组总项显示“显示1至n个条目”
我正在尝试实现行组,
我发现这个js http://cdn.rawgit.com/ashl1/datatables-rowsgroup/v1.0.0/dataTables.rowsGroup.js插件可以实现如下所示, 但是当我使用此插件时,条目数显示错误。
这是我的示例代码
<table id="example" class="display nowrap" width="100%">
<thead>
<tr>
<th>First Group</th>
<th>Second Group</th>
<th>Third</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
JS代码:
var data = [{"first":"subgroup1","second":"group1","third":"third data"},{"first":"subgroup1",{"first":"subgroup2","second":"group2","third":"lorem ipsum data"},]
$('#example').DataTable({
columns:[
{
name:"first",data:"first"
},{
name:"second",data:"second"
},{
name:"thirddata",data:"third"
},],data:data,rowsGroup: [
'first:name','thirddata:name'
]
});
在JS Fiddle中进行了更新:https://jsfiddle.net/r2f87hg6/2/
请在此数据表中建议按分组显示条目数。
谢谢
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。