Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


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 });

                    $("#mytable").mdbEditor({
                        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

Hi,

Create snippet with your code here: mdbootstrap.com/snippets. 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.

FREE CONSULTATION

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

Status

Opened

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