10

I have just started working with jquery. I used jquery data-table plugin for enabling table-view. Iam in need to disable show entries property. Can anyone help me in which js i need to disable the property?

I had followed this link but doesn't help. I don't know which js has to be modified. here

Thanks in Advance

shanthi_karthika
  • 915
  • 2
  • 8
  • 22

4 Answers4

19

This had worked for me. Use the code in your html you have built

$(document).ready(function () {
        var oTable = $('#example').dataTable({                    
            "aaData": orgContent,
            "bLengthChange": false //used to hide the property  
          });

As per latest documentation bLengthChange in above piece of code should be lengthChange.

shanthi_karthika
  • 915
  • 2
  • 8
  • 22
  • 3
    As of 2016 you need to set the `lengthChange` property to `false` as stated in the documentation: https://datatables.net/reference/option/lengthChange @shanthi_karthika, would you mind to update your answer? The correct code is now `$('#example').dataTable( {"lengthChange": false} );` – FlavioEscobar Feb 09 '16 at 21:11
  • Thanks for notifying me. I will update my answer with change mentioned. – shanthi_karthika Jul 07 '16 at 12:24
12

you need to use this code:

$('#example').dataTable({ 
  "bInfo": false
});
Ziad
  • 146
  • 3
8

notice the "paging" property in below example. once you set it to false. Show entries will get disabled.

$(document).ready(function() {
    $('#your_table_name').dataTable( {
        "paging":   false,
        "ordering": false,
        "info":     false
    } );
} );
Asanga Dewaguru
  • 1,058
  • 2
  • 16
  • 31
1

this works for me:

<table class="dataTable" data-role="datatable"  data-info="false">
     <tr>
          <td></td>
     </tr>
</table>

it's all.