How to customize Data Tables

Customizing Data Tables - 

In the below scenario i have changed data table button names, customize paginate, customize search, customize infoFiltered etc. You just need to get your data from a data source and apply the below code.

Code - 

$("#tbl").DataTable({
        dom: 'Bfrtip',
        buttons: [{
          extend: 'pdf',
          text: 'Pdf'
        }, {
          extend: 'excel',
          text: 'Excel'
        }],
        language: {
          paginate: {
            next: '→', // or '→'
            previous: '←' // or '←' 
          },
          search: '🔎',
          info: "Resultados _START_ a _END_ de _TOTAL_ entradas",
          infoEmpty: "Resultados 0 a 0 de 0 entries",
          emptyTable: "No hay datos disponibles en la tabla",
          infoFiltered: "(filtrado de _MAX_ entradas totales)",
          zeroRecords: "No se encontraron registros coincidentes"
        }
 }); 





Comments

Popular posts from this blog

How to Customize exported excel's cell background color in Datatables

Populate dropdown using jquery ajax in SharePoint

Customizing SharePoint list and implementing Quick search using jQuery