Cannot change settings after initialization without an alert

Cannot change settings after initialization without an alert

bwlangbwlang Posts: 20Questions: 0Answers: 0
edited February 2010 in Bug reports
I'm using many datatables on my site...
Most have the same initialization settings so i put that it its own little js file.

Sometimes I need to override though.
Unfortunately i don't have the dataTables object so I have to look it up - which causes an error

var tbl = $("table").dataTable();
tbl.fnSettings.bStateSave = false;

sigh... any chance to avoid this alert?

Replies

  • allanallan Posts: 63,389Questions: 1Answers: 10,449 Site admin
    Changing features on-the-fly is not supported in DataTables (also the call tbl.fnSettings.bStateSave is wrong :-), it should be tbl.fnSettings().oFeatures.bStateSave = false ). In this case it might work (although it will already have saved state from the first draw - which I doubt you want). But long and short of it is that this is not currently supported behaviour. Sorry.

    This thread might possibly (?) be of interest to you: http://datatables.net/forums/comments.php?DiscussionID=1314

    Allan
  • bwlangbwlang Posts: 20Questions: 0Answers: 0
    this is now supported using the bRetreive option
    so I think it can be closed.
This discussion has been closed.