Setting table properties after it has been initialized

Setting table properties after it has been initialized

lgupta1lgupta1 Posts: 5Questions: 0Answers: 0
edited December 2012 in General
// Initializing all tables of class "dataTable"
$('.dataTable').dataTable({
"sPaginationType" : "full_numbers"
});

....
....
....

// Later for a given table I need to set some specific values. when I do this, I get an error that the table has already been initialized
$("#testTable").dataTable({
"iDisplayLength" : 50,
"bAutoWidth" : false
});

Question - How can I set these properties after a table has been initialized?

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    You cannot - these options are initialisation options and can be set at initialisation time only. You'd need to destroy the table and recreate it with the new options.

    Allan
  • lgupta1lgupta1 Posts: 5Questions: 0Answers: 0
    Thank you.
This discussion has been closed.