Topic: Update Datatable with new rows, paginated

yourpatrol free asked 4 years ago

I have used the jQuery Datatable with pagination and it works and renders fine. I then want to be able to update the data/rows with refreshing the entire page.

Note the code has run already and created my intial table just fine. I now want to add some rows () and then update the mdb table.

My code:

$("#mytable").DataTable({ "destroy": true, "lengthChange": false //disables the display 'x' per page control });

                        modalEditor: true

The code i has doesn't error but it doesn't show the new rows.

How do i best achieve what i am after here? anybody have a sample?

Grzegorz Bujański staff commented 4 years ago


Create snippet with your code here: I'll look at this.

Best, Grzegorz

NANA DARKO free commented 3 years ago

Destroy the table and recreate it:

$('#mytable').DataTable().clear(); $('#mytable').DataTable().destroy();

Marcin Luczak staff commented 3 years ago

@NANA DARKO thank you for this response :)

Keep coding, Marcin from MDB

Please insert min. 20 characters.


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



Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.12.0
  • Device: PC
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No