Topic: datatable and entriesOptions

dwilbur priority asked 7 months 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'?


dwilbur priority answered 7 months 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 7 months 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.


Kamila Pieńkowska staff answered 7 months 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



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 Standard
  • MDB Version: MDB5 6.1.0
  • Device: na
  • Browser: na
  • OS: na
  • Provided sample code: No
  • Provided link: No