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.

We've moved the forum!

Please use for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

remove "Delete" button in GridField edit form

Go to End

4 Posts   3094 Views


Community Member, 82 Posts

9 June 2013 at 3:49am

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?



Forum Moderator, 5523 Posts

9 June 2013 at 5:47pm

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


Community Member, 82 Posts

10 June 2013 at 12:24am

Hi Willr,

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



Forum Moderator, 5523 Posts

15 June 2013 at 8:50pm

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.