1

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:

$('#my-final-table').dynatable({
    dataset: {
    records: recordArray,
},

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

How can this be solved?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user3257755
  • 337
  • 3
  • 15

1 Answers1

1

My code:

     response = $.parseJSON(data);

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

             dynatable.settings.dataset.originalRecords = response;
             dynatable.process();