Hide New/Edit/Delete buttons in Editor

Hide New/Edit/Delete buttons in Editor

Pedro MartinsPedro Martins Posts: 22Questions: 11Answers: 0
edited October 2019 in Free community support

Hello i need to remove or hide the editor buttons from table. How can i do this?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586
    Answer ✓

    Hi @Pedro Martins ,

    If you want it permanently removed, you can remove the Buttons from the list - see here (edit is removed). You can still call edit() with the API.

    Cheers,

    Colin

  • Pedro MartinsPedro Martins Posts: 22Questions: 11Answers: 0

    Managed to solve it... had to add declare var table; and using it ...
    table = $('#example').DataTable({

  • gfong007gfong007 Posts: 7Questions: 3Answers: 0

    how to hide it temporary? I got like a list of users that I want to check and reactivate it again later?

  • allanallan Posts: 61,716Questions: 1Answers: 10,108 Site admin

    @gfong007 - I'm not sure I entirely understand. Do you want to hide the buttons until a row in the table is selected? The edit and delete buttons are by default disabled until a row is selected. Is that not enough, you actually want to remove or hide the buttons?

    Allan

  • gfong007gfong007 Posts: 7Questions: 3Answers: 0

    Hi Allan,

    it's okay for now. I just disabled the buttons for now but there is added complexity since the new, edit buttons are part of the original section with editor. I had to create copies of these functions since the className wasn't working with the original set.

This discussion has been closed.