How to hide a control button

How to hide a control button

cbazancbazan Posts: 3Questions: 1Answers: 0
edited February 2016 in Free community support

Hi, I can hide the control show <number> records at top of my table?
I'm using the scroller option but do not want that control is deployed.

Thank you

This question has accepted answers - jump to:

Answers

  • JoshuaHJoshuaH Posts: 6Questions: 1Answers: 2
    Answer ✓

    Not sure, but I think you're talking about the info setting? E.g. you don't want "Showing 1 to 10 of 57 entries" to show up? If so, then disable it like:

    $(document).ready(function() {
        $('#example').DataTable( {
            "info":     false
        } );
    } );
    
  • cbazancbazan Posts: 3Questions: 1Answers: 0
    edited February 2016

    Hi JoshuaH, no, I'm talking about Show <n> entries control at the upper left corner of the table.

  • JoshuaHJoshuaH Posts: 6Questions: 1Answers: 2
    Answer ✓

    Ah, then you want to make it so the user can't change the number of rows being shown: https://datatables.net/reference/option/lengthChange

    $('#example').dataTable( {
      "lengthChange": false
    } );
    
  • cbazancbazan Posts: 3Questions: 1Answers: 0

    Hi JoshuaH, that's exactly what I need.

    Thanks

This discussion has been closed.