datatable and entriesOptions


Topic: datatable and entriesOptions

dwilbur pro premium priority asked 2 years ago

could i get an example of how to after creation of a datatable via html (vs js) change the entriesOptions to be, for example: 25, 50, 100, 200, 'All'. also how could i get the current value of entriesOptions?

lastly, how can i set data-mdb-entries to 'All'?


Kamila Pieńkowska staff answered 2 years ago

You cannot set entriesOptions with html. I've prepared a snippet showing how to access entriesOptions and how to change entries to All.

https://mdbootstrap.com/snippets/standard/kpienkowska/5639072


dwilbur pro premium priority answered 2 years ago

for datatable.update(datatable.rows, {entriesOptions:  [10, 25, 50, 200, 'All'], entries: 'All'}) it has to have datatable.rows?

it can't be just datatable.update({entriesOptions:  [10, 25, 50, 200, 'All'], entries: 'All'})


Kamila Pieńkowska staff commented 2 years ago

It has to include data that are supposed to be in the data table. This is the easiest way to copy the data that are currently in the table.


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
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 6.1.0
  • Device: na
  • Browser: na
  • OS: na
  • Provided sample code: No
  • Provided link: No
Tags