Posts

Showing posts from August, 2021

https://datatables.net/forums/discussion/27216/how-to-get-the-parameters-on-mvc-controller-send-by-ajax-serverside-datatable-1-10

 https://datatables.net/forums/discussion/27216/how-to-get-the-parameters-on-mvc-controller-send-by-ajax-serverside-datatable-1-10

Export All from DataTables with Server Side processing?

Export All from DataTables with Server Side processing? Solution: First add the follwoing code in DataTable "dom": 'Blfrtip', "buttons": [ { "extend": 'excel', "text": '<button class="btn"><i class="fa fa-file-excel-o" style="color: green;"></i> Excel</button>', "titleAttr": 'Excel', "action": newexportaction }, ], Then add this function inside $(document).ready() function function newexportaction(e, dt, button, config) { var self = this; var oldStart = dt.settings()[0]._iDisplayStart; dt.one('preXhr', function (e, s, data) { // Just this once, load all data from the server... data.sta

datatables-dynamic-columns

  <!DOCTYPE html > < html lang =" en " > < head > < meta charset =" UTF-8 " > < title > Datatable with dynamic headers </ title > < link rel =" stylesheet " type =" text/css " href =" datatables.min.css " > < script src =" datatables.min.js " > </ script > </ head > < body > < h2 > Skygate front-end LAB Datatable example with dynamic headers </ h2 > < table id =" demotable " class =" table table-striped table-condensed dataTable " > < thead > < tr > </ tr > </ thead > </ table > < script > var data , tableName = '#demotable' , columns , str , jqxhr = $ . ajax ( 'data/data.json' ) . done ( function ( ) {