How i show default 10 rows data in datatable ?

How i show default 10 rows data in datatable ?

rashedkrashedk Posts: 4Questions: 0Answers: 0
edited May 2023 in Free community support

Hello expert,

How i show default 10 rows data in datatable ? Currently all data is showing very first loading. that is very occord. I want only 5 or 10 data will be load very first time. How i do it ? I tried the following script. But i did not get desire result.

Please help me.

jQuery('#show_data').DataTable({
"info": false,
pagingType: 'full',
responsive: true,
searching: true,
autoWidth: true,
lengthChange: true,
iDisplayLength: 2,
lengthMenu: [[5, 10], [5, 10]]
});

**** I also used "pageLength": 10 but that is working. **

Replies

  • kthorngrenkthorngren Posts: 20,302Questions: 26Answers: 4,769

    The default page length is 10 rows. If all the rows are showing then it is likely you are getting a Javascript error. Look in the browser's console for errors and let us know what you find.

    Kevin

  • rashedkrashedk Posts: 4Questions: 0Answers: 0

    Okay i will check

Sign In or Register to comment.