Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions

remove "Delete" button in GridField edit form


4 Posts   691 Views


9 June 2013 at 3:49am Community Member, 82 Posts

Hello everyone,

I have a data object managed "product" in model Admin interface. I want to set the permission to delete data objects to administrators only. I have this function which removes the delete button from the grid for non administrators, but not on the gridfield edit form:

function canDelete($member = null) {
return Permission::check('DELETE_PRODUCTS');

I want the delete button to be removed from the edit form too. I don't know why the permission check works only on the gridfield list but not on the edit form..

any help?



9 June 2013 at 5:47pm Forum Moderator, 5511 Posts

Are you running the latest 3.1 build? I believe this had been fixed.


10 June 2013 at 12:24am Community Member, 82 Posts

Hi Willr,

I'm using the stable version 3.0.5. Should I update to 3.1 build?



15 June 2013 at 8:50pm Forum Moderator, 5511 Posts

Try upgrade and see if that fixes the issue, try define a canEdit function as well. I believe the delete button checks for edit as well. If this isn't fixed in 3.1 raise an issue.