Alec Tang

Professional Web Developer/ Web Designer

I build websites based on the latest web standards providing the best possible solution to your company

  • Home
  • About
  • Portfolio
  • Contact
  • Blog
Subscribe Feed

Restore list form web part for EditForm

Posted by Alec on Wed, 20 Jan 2010, in Sharepoint   

Yesterday I spent the whole day finding on the Internet about how to restore the list form web part of my edit form as I accidentally deleted it and could never get it back from the Closed web parts, nor could I get it back by resetting the file to site definition in Sharepoint Designer. It is really important to remember that the original edit form, display form and new form should never be deleted, but kept as hidden if we had to customise them.

What happened after I deleted my edit form, caused the edit link to disappear in the display page, nor could I edit properties of any item, or it will just redirect to the AllItems.aspx page. So, to retrieve the edit form back, what we do is:

  1. In Sharepoint Designer, open the EditForm.aspx and DispForm.aspx. Grab a copy of both files and paste them in Notepad for backup.
  2. On EditForm.aspx, go to Designer mode, click on the spot behind your own edit form, and go to Insert -> Sharepoint Controls -> Choose Edit item form, assign the right list in the dropdown on top. That should put back the original edit form. Designer will render it as error but that's okay.
  3. Next, on DispForm.aspx, copy the Display Form web part code in code behind, and then back to EditForm.aspx, find the code which Sharepoint Designer just inserted for you (the original edit form), and paste the DispForm code there. Don't go to the Design mode now!
  4. Change the ControlMode from Display to Edit.
  5. Change the FormType to 6.
  6. Save the page. Try it on Sharepoint site to see if it is working. It should, if not then it's really cooked and you can try changing the Guid ID of the web part and ID.
Comments Be the first to write a comment. Comment gets approved before publishing.

Post Your Comment

 
 
   

Search

 

Latest Posts

  • Website finally back up from Google's block
  • Sys.WebForms.PageRequestManagerParserErrorException
  • How Google treats Content Duplication
  • How to create HTML column in Sharepoint List View
  • How Sharepoint stores User Data
  • How to send email via Sharepoint
  • Malaysia Airlines launched iPhone Application: MHMobile
  • Intranet, the next big market
  • How to retrieve and update from a multi choice Checkboxlist ...
  • Auto Complete returns giant list of undefined

Categories

  • Browsers (1)
  • Projects (1)
  • Web Design (7)
  • Sharepoint (20)
  • Telerik (5)
  • Wordpress (1)
  • Internet (2)
  • SQL (5)
  • LINQ (3)
  • ASP.NET C# (33)
  • JavaScripts (3)
  • IIS (0)
  • Industry (1)
  • Tools (8)
  • SEO (5)

Archives

  • August 2010 (1)
  • May 2010 (1)
  • April 2010 (3)
  • March 2010 (5)
  • February 2010 (4)
  • January 2010 (11)
  • November 2009 (3)
  • October 2009 (1)
  • September 2009 (9)
  • August 2009 (3)
  • July 2009 (4)
  • June 2009 (1)
  • May 2009 (2)
  • April 2009 (8)
  • March 2009 (6)
  • February 2009 (2)
© Copyright 2009 Alec Tang. All Rights Reserved.
This site is conform to W3C Standard XHTML & CSS