gurayyarar / AdminBSBMaterialDesign

AdminBSB - Free admin panel that is based on Bootstrap 3.x with Material Design
https://gurayyarar.github.io/AdminBSBMaterialDesign
MIT License
2.74k stars 1.56k forks source link

add show row length in exportable datatable #157

Closed isanjaymaurya closed 5 years ago

isanjaymaurya commented 5 years ago

https://gurayyarar.github.io/AdminBSBMaterialDesign/pages/tables/jquery-datatable.html

how to show rows (10, 50, 100, 500) in the exportable data-table. i had use this server side datatable in the one of my project and show rows required in that datatable. i had added. here is what i had try. but its working in other project which have datatable v 1.10.16. (this code work with my other project in which i haven't use adminBSB theme)

any suggestion would be appreciated.

lengthMenu: [

  | [ 10, 25, 50, 100, 500, -1 ],   | [ '10 rows', '25 rows', '50 rows', '100 rows', '500 rows', 'Show all' ]   | ],   | buttons: [   | {   | extend: 'colvis',   | text: "Columns"   | },   | {   | extend: 'pageLength',   | text: 'Show'   | },

------------or----------

$('#datatable1').dataTable({

  | dom: 'Bfrtip',   | aaSorting : [[0, 'desc']],   | lengthMenu: [   | [ 10, 25, 50, 100, 500, -1 ],   | [ '10 rows', '25 rows', '50 rows', '100 rows', '500 rows', 'Show all' ]   | ],   | buttons: [   | 'pageLength'   | ],   | });

kerim878 commented 5 years ago

This isn't issue of template. Please don't open issue unrelated to template. You can get help from Google or DataTables official documentation. Please close issue if you can.

isanjaymaurya commented 5 years ago

yes but i dont have access to close this. and yes i got the solution we have to add dom: '1Bfrtip',