Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

When opening/editing a list item, the default ribbons (delete, version history, etc) appear at the top. However when I customize the EditForm.aspx and replace the default webpart with custom content, these ribbons suddenly disappear. Any ideas how to ensure that the ribbons stay there?

Thanks

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

I have done some playing around with this, and i think that the edit form web part is the thing that is actually creating the ribbon. If you close or delete it, then the ribbon does not display.

Also if you try to do the same on the NewItem page you get this message:

You are about to permanently delete this Web Part. Deleting this Web Part will render this form unusable. You will not be able to re-insert this Web Part using the browser. Are you sure you want to do this?

And then this when you try to create items

Unable to find the default new form for list Test.

UPDATE

If you have a look at:

Microsoft.SharePoint.WebPartPages.ListFormWebPart.OnPreRender()

You will see the code that displays the ribbon. This is the edit form web part. I guess you could copy it in your custom web part to make the ribbon display.

share|improve this answer
    
This would theoretically work. However it is easier to just keep the old WebPart on the site and just configure it to be invisible. This way it still populates the ribbons correctly. –  driAn Feb 1 '11 at 13:55
add comment

It sounds as though you broke something in the page that is needed for the ribbon, e.g. JavaScript reference or a control. Not a very helpful answer, I know! Not much more we can suggest with the information given.

I would go back to the original EditForm.aspx and make simple incremental changes until either you get what you want or the ribbon dissapears, at which point you will know what broke it. These pages have a lot of interconnected parts and are quite fragile if you start editing them.

share|improve this answer
add comment

Your Answer

 
discard

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.