Hi there,
I want to remove the "Delete" button from my list control. I have attempted to use the below link code but it doesnt seem to be working for me. In my JS code now I have successfully hidden the "New" button, but can't remove the delete. How can I do this? Appreciate the help
Dear @tnewton ,
You can use the following code to hide the delete button altogher and disable selection of more than one:
fd.spRendered(function() {
fd.control('SPDataTable1').ready().then(function(dt) {
//hide Delete on load
dt.buttons[1].visible = false;
dt.$watch('selectedItems', function(items) {
//hide Delete on select
dt.buttons[1].visible = false;
//disable selecting more than one row:
var grid = fd.…
Hello @mhannaway ,
You can use this code to hide the delete button in a List or Library control in dialog editing mode:
fd.spRendered(function() {
fd.control('Control1').ready(function(dt) {
fd.control('Control1').$watch('selectedItems',
function(items) {
fd.control('Control1').buttons[3].visible = false;
});
});
});
If the List or Library control is in inline editing mode, change the button index to 2:
fd.control('Control1').buttons[2].visible = false;
1 Like