Question

I need to show the Display number of records in a page by using datatables plugin. I have included the following js files:

js/jquery.dataTables.js
js/ColVis.js
js/ColumnFilterWidgets.js
js/extras/TableTools/media/js/ZeroClipboard.js
js/media/js/jquery.dataTables.js
js/extras/TableTools/media/js/TableTools.js

and code is like:

oTable = $('#data-table').dataTable( {
         "sDom": 'CT<"clear">firtlip',
        "oTableTools": {
            "sSwfPath": basePath+"/js/extras/TableTools/media/swf/copy_csv_xls_pdf.swf",
            "aButtons": [ {"sExtends": "csv","sFileName" : curpath+".csv","sButtonText": "Save to CSV","mColumns": "visible"} ]
        },
       "aaSorting": [[0, "desc"]],
       "bAutoWidth":false,
       "aLengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
       "iDisplayLength": 10,
       'sPaginationType': 'full_numbers'
    } );

But the select box for for selecting the number of records is not displaying. Please guide me where is the issue. Thanks in advance.

Was it helpful?

Solution

If you change your css then automatically solve the issue. Just change "display:none" to "display:block" for data-table_length class in css.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top