Applying icon in place of text for cutom buttons

Applying icon in place of text for cutom buttons

SKCSKC Posts: 33Questions: 10Answers: 0

I have placed a custom Excel button for my datatable.

 buttons: [

            {

                text: 'Excel',

                action: function ( e, dt, node, config ) {

                    ExportRequests();
                }

            }

Instead of the text I want to apply icon on this button. How can I achieve it?

Answers

  • SKCSKC Posts: 33Questions: 10Answers: 0

    Got it working by modifying as follows :

     "buttons": [
            {
                text: '<span class="glyphicon glyphicon-file" data-toggle="tooltip" title="Export To Excel"/>',
                 action: function ( e, dt, node, config ) {
                     ExportRequests();
                 }
             }
    
This discussion has been closed.