Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to disable show entries property in jquery datatable

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

like image 543
shanthi_karthika Avatar asked Dec 26 '13 13:12

shanthi_karthika


People also ask

How do you turn off DataTables?

To disable the DataTables search input, download and install this plugin: GravityView - Disable DataTables Search Filter. Once the plugin is installed and activated, you will no longer see the DataTables search input.

What is Rails dataTable?

ajax-datatables-rails is a wrapper around DataTables ajax methods that allow synchronization with server-side pagination in a Rails app. It was inspired by this Railscast. I needed to implement a similar solution in a couple projects I was working on, so I extracted a solution into a gem.


2 Answers

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
    } );
} );
like image 64
Asanga Dewaguru Avatar answered Oct 02 '22 04:10

Asanga Dewaguru


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.

like image 36
shanthi_karthika Avatar answered Oct 02 '22 06:10

shanthi_karthika