I developed in VS 2010 a custom list form and I want to use the "standard" Sharepoint Ribbon, ie, the same Ribbon used in all list forms withe the same buttons.

It's possible do this?

Any help will be appreciated.


Yes it is possible. In my case the was a visual studio solution that contained a list with custom forms.

      <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\CustomDisplayForm.aspx" WebPartZoneID="Main" />
      <Form Type="EditForm" Url="EditForm.aspx" SetupPath="pages\CustomEditForm.aspx" WebPartZoneID="Main"/>
      <Form Type="NewForm" Url="NewForm.aspx" SetupPath="pages\CustomNewForm.aspx" WebPartZoneID="Main"/>

And the pages referenced all are inherited from WebPartPage. The solution put these pages into {SharePointRoot}\Template\Pages.

Please let me know if you haven't got the idea and need more details.

| improve this answer | |
  • It was one of my first trials. When I try to open a created item (my custom form is a display form), the form is open with no ribbon. – cpinheiro Mar 2 '12 at 13:47
  • 1) Ensure that your page inherits from a webpart page – Maks Matsveyeu Mar 2 '12 at 20:44
  • 2) Make sure that there is actually a listformwebpart on the page – Maks Matsveyeu Mar 2 '12 at 20:44
  • 3) hide the listforwebpart on prerender. This solution is quite dirty but when you realize how it all works you will be able to come to the idea how to make it more clear. Like my team and me did :) I wish you good luck – Maks Matsveyeu Mar 2 '12 at 20:46
  • Thank you for your help. It works ;o) – cpinheiro Mar 4 '12 at 19:32

I have an idea for this task - you can implement your custom form UI as a webpart and add it to a standard list item form. Then you need to hide (but not delete) a standart data form on that page. The idea behind it is to let the dataform webpart do the work for you - on a standard page it requests the needed tabs from the ribbon.. I've realized that it doesn't work because in this case you will not be able to control item save button - it will be rendered by DataFormwebPart. :(

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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