Hide export button or alert when no date is available
Hide export button or alert when no date is available
PrabhuKhanna
Posts: 2Questions: 2Answers: 0
HI, I am looking for a event to hide the export button or alter the user not to export when there is no data available.
Is there any option to perform this. However, I can do this by Jquery hide attribute. I am just curious to know whether datatable has any simpler solution.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @PrabhuKhanna ,
Buttons does have an API - so you could use
buttons().disable()
to disable the button (but leave it on the page), orbutton().remove()
to remove it entirely. But yep, jQuery hide is also a valid solution.Cheers,
Colin