Get the enable/disable state of Datatable button

Get the enable/disable state of Datatable button

williamay53williamay53 Posts: 7Questions: 5Answers: 0
edited August 2018 in Free community support

Hi,

There are https://datatables.net/reference/api/button().enable() to enable/disable button. But how can I retrieve the enable/disable state of a button? I cannot find it in the api page. Thx

William

Answers

  • colincolin Posts: 15,144Questions: 1Answers: 2,586

    Hi @williamay53 ,

    DataTables adds the class disabled to the button - so you can check the button for that. In this example here, you would use:

    $('.colinXLS').hasClass('disabled')
    

    Cheers,

    Colin

This discussion has been closed.