Datatable with changing AJAX Source

Datatable with changing AJAX Source

peipstpeipst Posts: 7Questions: 0Answers: 0
edited March 2013 in General
Hello,
I'm using a Datatable to retrieve certain information via "sAjaxSource".
In my application I need to change the source URL, I achieved this by calling myTable.fnSettings().sAjaxSource = "someNewUrl" and fnDraw(true)

The fact is that the "new" returned data have a different number of rows (column number can change multiple times).
I do rewrite the of the Table using an AJAX request which returns the new correct Heading, but my Datatable breaks afterwards. The is correct, the AJAX response of the Datatable returns correct information (for example 3 columns now instead of 5).

Debugger: http://debug.datatables.net/elipeb

At the Debug information you can see that the is still the old one and row has less columns (null-values)
I'm using jQuery 1.9.1 (+Migrate Library) and Datatables 1.9.4. My application is on a nonpublic development machine.

What I need is a function which parses the again, I searched in the documentation but didn't find anything like that.

Any ideas are appreciated!!!
kind regards, peipst

Replies

  • peipstpeipst Posts: 7Questions: 0Answers: 0
    Problem solved, I used table.fnDestroy(); and reinitialized the datatable to solve my issue.

    Thanks anyways.
This discussion has been closed.