0

我正在使用 datatables jQuery Plugin numeric-comma 并希望按数字逗号值排序。

当我尝试按照数据表建议的方法时出现错误

错误:k[(qa ? qa : "string") + "-" + h[c][1]] 不是函数

这是我在下面给出的代码

var oTable = $('#transactiontable').dataTable( {
                "iDisplayLength": 10,
                "aLengthMenu": [[10, 20, 50, -1], [10, 20, 50, "All"]],
                "bProcessing": true,
                /*"bServerSide": true,*/
                "oLanguage": {
                    "sEmptyTable": "There is no transaction found.",
                    "sSearch": "Search all columns except few:"
                },
                "sAjaxSource": "transactions-processing.php",
                "sScrollX": "100%",
                "sScrollXInner": "3000px",
                "bScrollCollapse": true,
                "sPaginationType": "full_numbers",
                "aoColumnDefs": [
                    {
                        "bSortable": false,
                        "aTargets": [ 18,19,20,21,22 ]
                    },
                    {
                        "sType": "numeric-comma",
                        "aTargets": [ 3 ]
                    }
                ],
                /*"fnRowCallback": function( nRow, aaData, iDisplayIndex ) {
                    if ( aaData[1] == "5" ){
                        $('td:eq(1)', nRow).addClass( 'testrow' );
                    }
                },*/
                "fnInitComplete": function () {
                    new FixedColumns( oTable, {
                        "iLeftColumns": 2,
                        "iRightColumns": 1
                    });
                }
            });
            <?php }?>
        });

有人可以检查我的代码并指导我哪里错了......?

提前致谢

4

1 回答 1

0

If you run your table through the DataTables debugger ( http://debug.datatables.net/ ) that might give us a clue as to what is happening. What is the error you get if you use the unminified version of DataTables?

于 2012-06-22T13:27:57.770 回答