Directly adding footer in JQuery DataTable -


i want directly add footer jquery datatable, body of table using dt.row.add() method. how possible without using footer callback method?

thanks.

datatables doesn't seem have api add footer dynamically, if that's want. checks presence of <tfoot> element during initialization only.

to add footer dynamically:

  1. destroy table destroy().

    $('#example').datatable().destroy();
  2. append <tfoot><tr><th></th></tr></tfoot> <table> element making sure you're adding many <th></th> elements there columns in table.

  3. re-initialize table same options:

    $('#example').datatable({ /* options here */ });

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

android - CollapsingToolbarLayout: position the ExpandedText programmatically -

Listeners to visualise results of load test in JMeter -