How i show default 10 rows data in datatable ?
How i show default 10 rows data in datatable ?
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
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
Okay i will check