user3257755 user3257755 - 1 year ago 341
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?

Answer Source

My code:

     response = $.parseJSON(data);

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

             dynatable.settings.dataset.originalRecords = response;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download