Dynamic Table

Dynamic Table

helloaliimranhelloaliimran Posts: 2Questions: 2Answers: 0

i have this dataTable. But i add rows to the table dynamically using jquery. but when i click on any button the data in the table is not showing. any idea what i am doing wrong.

$("#tblbill").DataTable({

        dom: 'Bfrtip',
        buttons: [
'copyHtml5', 'excelHtml5', 'pdfHtml5', 'csvHtml5','print'
        ]
    });
});

Answers

  • kthorngrenkthorngren Posts: 20,317Questions: 26Answers: 4,772

    If you are not using Datatables API's like rows.add() to add data to the tables then Datatables doesn't know about the data. If this is the case then rows().invalidate() will need to be used after you add the data to have Datatables re-read the table.

    Kevin

This discussion has been closed.