DataTable:如何隐藏"显示#到#条目#(从#total条目中过滤掉)"?

时间:2015-02-18 20:01:57

标签: datatables

我在我的申请中使用DataTable

我想隐藏左下方的细节,我该怎么做?

“显示1,657个条目中的1到10个(从9,044个条目中筛选出来)”

以下是我的设置:

$('#inventory_related').dataTable({

    "lengthMenu": [ 10 ] ,
    "bLengthChange": false,
    "searchHighlight": true


  });

3 个答案:

答案 0 :(得分:3)

$('#tbl-my-queue')。DataTable({                          “语言”:{
                                   “infoFiltered”:“”                                },                         });

将infoFiltered选项添加为空白

答案 1 :(得分:2)

将此添加到我的设置"bInfo" : false

最终设置应如下所示:

 $('#inventory_related').dataTable({

    "lengthMenu": [ 10 ] ,
    "bLengthChange": false,
    "searchHighlight": true,
    "bInfo" : false

  });

答案 2 :(得分:2)

较新版本的DataTable现在使用"bInfo" : false而不是之前的static void Main(string[] args) { const decimal fifty = 7.25M; const decimal hundred = 15.75M; const decimal overhundred = 21.50M; decimal sumfifty = 0.0M; decimal sumhundred = 0.00M; decimal sumoverhundred = 0.00M; decimal sentinel; WriteLine("\n*** PROBLEM 4 ***\n"); do { Write("How many pieces? "); Write("Enter any whole number or -999 to quit: "); stenter code herering input = ReadLine(); sentinel = Convert.ToDecimal(input); sumfifty = sentinel * fifty; sumhundred = sentinel * hundred; sumoverhundred = sentinel * overhundred; if (sentinel >= -998 && sentinel <= 0) { WriteLine("At 0 pieces at $0.00 per piece, you've earned $0.00."); } if (sentinel >= 1 && sentinel <= 49) { WriteLine("At {0} pieces at {1} per piece, you've earned {2}.\n", sentinel, fifty, sumfifty); } else if (sentinel >= 50 && sentinel <= 100) { WriteLine("At {0} pieces at {1} per piece, you've earned {2}.\n", sentinel, hundred, sumhundred); } else { WriteLine("At {0} pieces at {1} per piece, you've earned {2}.\n", sentinel, overhundred, sumoverhundred); } } while (sentinel != -999); WriteLine("\nThanks for using our system."); Write("Press any key to continue..."); ReadKey(); }