unable to destroy datatable created with html5 export buttons

unable to destroy datatable created with html5 export buttons

nsrahulnsrahul Posts: 1Questions: 1Answers: 0

I just want to destroy and reinitialize datatable.

I initialized datatable with following options

dataTableobj = $("#dataTable").dataTable({ "bDestroy": true, "scrollX": true, dom: 'Bfrtip', buttons: ['csv', 'excel', 'pdf'] });

but trying to destroy it with following line

dataTableobj.fnDestroy();

it returns following error in console

TypeError: a[b] is undefined

with following inner details

.destroy()
  dataTables.buttons.min.js:7
 ._constructor/<()
  dataTables.buttons.min.js:10
 m.event.dispatch()
  jquery.min.js:3
 m.event.add/r.handle()
  jquery.min.js:3
 m.event.trigger()
  jquery.min.js:3
 .trigger/<()
  jquery.min.js:3
 .each()
  jquery.min.js:2
 m.prototype.each()
  jquery.min.js:2
 .trigger()
  jquery.min.js:3
 u()
  jquery.dataTables.min.js:75
 <anonymous>
  jquery.dataTables.min.js:137
 .iterator()
  jquery.dataTables.min.js:99
 <anonymous>
  jquery.dataTables.min.js:136
 r.extend/g/<()
  jquery.dataTables.min.js:102
 m/this.fnDestroy()
  jquery.dataTables.min.js:79
 ViewSO/<.success()
  SalesOrderList.aspx:514
 m.Callbacks/j()
  jquery.min.js:2
 m.Callbacks/k.fireWith()
  jquery.min.js:2
 x()
  jquery.min.js:4
 .send/b()

This discussion has been closed.