user3257755 user3257755 - 2 months ago 32
HTML Question

How to clear dynatable and add new data?

I'm working with a dynatable in javascript that I want to clear and add new data to.

This is the code for initializing the dynatable:

dataset: {
records: recordArray,

However, this doesn't work when the dynatable is already created. If so, nothing happens.

How can this be solved?


My code:

     response = $.parseJSON(data);

            var dynatable = $('#printIDs').dynatable({
                dataset : {
                    records : response

             dynatable.settings.dataset.originalRecords = response;