0

i'm using DataTables in a coldfusion project so i want to create a refresh button for my table without using ajax but by using the sent data from my CFC.

$.fn.dataTable.ext.buttons.refresh = {
    text: 'Refresh'
  , action: function ( e, dt, node, config ) {
      dt.clear().draw();
      dt.ajax.reload();
}}
    

var table = $(divname).dataTable({
          data: data,
           columns: columns,
        dom: 'Bfrtip',
         buttons: ['refresh'],
         "oLanguage": language_datatable,
      });
      return table;
    }
Mohsen Alyafei
  • 4,765
  • 3
  • 30
  • 42
spinx king
  • 17
  • 6
  • Does this answer your question? [How do I refresh/reload my DataTable from HTML source](https://stackoverflow.com/questions/36529662/how-do-i-refresh-reload-my-datatable-from-html-source) – andrewJames Jul 16 '20 at 14:31
  • it helps but i want to use that code into my refresh button how can i possibly transfer it to the button please i want to use the code inside the datatable declaration not in html because i m using global function – spinx king Jul 17 '20 at 10:46

0 Answers0