Multiple DataTable with different columndefs?

Multiple DataTable with different columndefs?

prodderprodder Posts: 1Questions: 1Answers: 0

The example for multiple datatables show using the same code to initialize the data tables, but my tables have different columndefs. I was wondering what the best method around this was?

Answers

  • s3tests3test Posts: 18Questions: 3Answers: 0

    You can give each of your tables a unique ID and then initialize them one by one with different options (including columnDefs).

    $('#table1').DataTable();
    $('#table2').DataTable();
    $('#table3').DataTable();
    etc

This discussion has been closed.