How to remove Delete Button from Tabledit Datatable

How to remove Delete Button from Tabledit Datatable

SkuizSkuiz Posts: 5Questions: 4Answers: 0

Good Day,

I have a data table using the edit plugin.
When the table is drawn, there are two buttons, edit and delete.
I want to know if i can remove the delete buttom fron the table rows please, as i only want to be able to edit.

`<script>
$(document).ready(function(){

 var dataTable = $('#tabla_clientes').DataTable({
    "language": {
        "url": "https://cdn.datatables.net/plug-ins/1.10.20/i18n/Spanish.json"
    },  
  "processing" : true,
  "serverSide" : true,
  "order" : [],
  "ajax" : {
   url:"fectch.php",
   type:"POST"
  }
 });

 $('#tabla_clientes').on('draw.dt', function(){
  $('#tabla_clientes').Tabledit({
   url:'action.php',
   dataType:'json',
   columns:{
    identifier : [0, 'id_customer'],
    editable:[[1, 'customerID'], [2, 'RFC'], [3, 'firstname'], [4,'lastname'],[5,'email']]
   },
   restoreButton:false,
   onSuccess:function(data, textStatus, jqXHR)
   {
   $('#' + data.id).remove();
   $('#tabla_clientes').DataTable().ajax.reload();
   }
  });
 });

}); 
</script>`

Here is an example i dont want the table to show the trashcan "delete" button

Thanks in advance for the time and the help

This question has an accepted answers - jump to answer

Answers

Sign In or Register to comment.