小编Mat*_*att的帖子

jquery datatables - 对组内的列求和

我太接近于得到我想要的东西,只需要一些帮助.

我有分组工作.现在,我想对每个组的列进行求和,并在组头中显示总计.这是一个jsfiddle,因为它更容易显示我正在尝试做什么:

http://jsfiddle.net/RgKPZ/123/

相关代码:

$(function() {
            oTable = $('#job_history').dataTable({

                "aoColumnDefs": [
                    { "bVisible": false, "aTargets": [ 4,5,6 ] },
                ],
                "aLengthMenu": [[10, 25, 50, -1], ["Show 10 entries", "Show 25 entries", "Show 50 entries", "Show all entries"]], // options in the show rows selector
                "iDisplayLength" : -1, // show all rows by default
                "aaSortingFixed": [[ 5, 'asc' ]],
                "aaSorting": [[ 5, 'asc' ]],
                "bJQueryUI": true,
                "sDom": '<flip>', // filter, length, info, pagination

                "oLanguage": {
                    "sSearch": "", // label for search …
Run Code Online (Sandbox Code Playgroud)

jquery datatables

5
推荐指数
1
解决办法
1万
查看次数

标签 统计

datatables ×1

jquery ×1