Domen Dolar - 2022-03-17

For adding export into DataTable you can use DataTable setting.

In RASD all default DataTable properties are stored in global variable _rasd_dataTableProperties.

With sample below you can overwrite default settings or add new ones. Default settings you can see in General CSS/JS - rasd/ rasd_datatable.html file.

This code you should save in FORM_JS part on CSS, JS source.

...
    var newDT1 = JSON.parse(JSON.stringify(_rasd_dataTableProperties));
    //properties for buttons
    newDT1.dom = 'Bfrtip';  
    newDT1.buttons = ['copy', 'pdf', 'excel', 'csv'];
    //
    newDT1.destroy = true;
    $("#B10_TABLE").removeClass( "rasdTableN" ); 
    xTable1 = $("#B10_TABLE").DataTable(newDT1);
 ...
 

Last edit: Domen Dolar 2022-12-15