Topic: Bootstrap 4 default entries datagrid

development priority asked 1 year ago


Expected behavior

Hello, Is possible to change the default entries on a datatable to 25?The default is now set to 10, and it is only possible to change it in the dropdown (in the screenshot). We would like to set it directly to 25.

Actual behavior

The datatable is always initialised with 10 entries shown.

Resources (screenshots, code snippets etc.)

enter image description here


development priority answered 1 year ago


Thank you for your answer. Is there any place where we can this kind of options from the datatable? We use this component a lot, so this will be very usefull for us.

We now look at the following place:

https://mdbootstrap.com/docs/b4/jquery/tables/datatables/

But there is nothing to find about the pageLength property.


Grzegorz Bujański staff commented 1 year ago

Our datatable plugin uses an external library: https://datatables.net/. All options available in this external library should work on our plugin. So if you need an option that doesn't describe in our docs, you can find them on datatable.net.


Grzegorz Bujański staff answered 1 year ago


You can use pageLength option to show 25 entries:

$('#dtBasicExample').dataTable({
  "pageLength": 25
});


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: MDB4 4.20.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No