SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a list called Tenders. I need to make sure that when Tender status field is set to "open" no one can delete it. Ideally would be if I won't see options in ecb and ribbon. It is not connected to users permissions but with state of list item. Should I use jQuery or is there an easier way?

share|improve this question
up vote -1 down vote accepted

Could you check this post for some help? -

share|improve this answer

You could create an Event Receiver for the OnDeleting event that prevents the item from being deleted. Basically have the event receiver check for the value of the field and cancel deletion if the right requirements are not met.

share|improve this answer
ItemDeleting is the name of the event receiver:… – John Chapman Dec 9 '11 at 17:53
Yes, I know but it is the server side, but how to prevent it on the client side. Simply hide the buttons. I have an idea to work with live() function in jquery and checking the values of current row - status is there, but that is quite tricky. – christof Dec 9 '11 at 19:53

It would be much better UX IMO to prevent the delete by either removing all the delete buttons or disabling them. Telling the user that they can't delete something after a post back is generally considered annoying these days.

Using client side script means that your user can always hack the page, of course, and delete the item anyway. It all comes down to your business requirements.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.