如何在JQuery中使用Datatables插件显示所选记录?

时间:2015-08-19 10:33:24

标签: javascript jquery jsp datatables

显示带有数据表的选定记录,if(documentType!= X)

如何使用Datatables实现上述代码,下面的代码已经实现并正常工作。它在Ajax调用并填充表后从JSON获取数据。

columnDefs: [
                {"width": "20%", targets: 0},
                {"width": "40%", targets: 1},
                {"width": "40%", targets: 2} //Set the width
            ],
            columns: [
                {"data": "documentType"},
                {"data": "fileName"}, //Display Linked file name
                {"data": "documentDate"} 
            ],
            aoColumnDefs: [ {
                    "aTargets": [ 1 ],
                    "mData": "fileName",
                    "mRender": function ( data, type, full ) {
                        return '<a href="'+full.link+'">'+full.fileName+'</a>'; //Supply link to file
                    }
            }]

0 个答案:

没有答案