none
How to customize the DispForm.aspx?

Answers

All replies

  • Hi,

     

    You can use SharePoint designer to coustomize your dispform.aspx, add a new controls and web parts in dispform.aspx (we cannot coustomize the webpart used to display the ListItem details).

     

    If this not clear your doubt, Please mention your requirement in detail.

     

     

     

    Tuesday, May 13, 2008 1:43 PM
  • If you want to customize the DispForm.aspx in one instance of a list then follow what Gopinath has suggested. If you want to use the same customizations in multiple instances of the list then create the list as a feature with its own set of all list pages with your customizations.

     

    Tuesday, May 13, 2008 2:16 PM
  • My requirement is that I will create a Picture Liabray to store some pictures. While user click a picture it will redirect to DispForm.appx. I want to let user input to some comments in the form such as normal blog's comments. So I need to add a TextArea to input comments, a div to display all comments, and a save button to save user's comments. If I can customize it, I will save the list as a template file in that case user can create the list again.
    Tuesday, May 13, 2008 2:28 PM
  • I would approach this by creating a user control and add it to the DispForm.aspx. You can develop User control to intake new comments and display the old ones.

     

    Just curious, how are you storing all the previous comments? One way I can think of is:

    • create a custom column called "Comments"
    • Enable versioning on the picture library
    • In user control display the version history of Comments as previous comments

    I'm curious what your approach is.

    Tuesday, May 13, 2008 2:35 PM
  • Hi,

     

    If you want to implement this in DispForm.aspx, you need to create a web part and add the webpart in dispform.aspx page using SPDesigner.

     

    My suggestion is, create a new column in Picture Library to store the comments. Now the comments column is displayed in EditForm.aspx. If you want to  display only comments column in Editform.aspx, Set all the other fields as hidden or use custom content type.

     

    Tuesday, May 13, 2008 2:44 PM
  • Thanks all,

    I will create a column named comment in the Picture Library, then create a UserControl which include textarea, div and button and put it in the DispForm.aspx by SharePoint designer. The div will display data from the created comment column. After user clicking the save button, it will merage the original comments and textarea's data, then save all to comment column. While user redirecting to EditForm.aspx, I will hidden the comment column.
    Tuesday, May 13, 2008 2:57 PM
  • No

    If you add a Comments column to the content type the dispform will automatically pick it up and provide the correct field for editing it.
    Wednesday, May 14, 2008 1:38 AM
  • In that case, I need to create a custom content type which don't contain the comment column.

     

    Wednesday, May 14, 2008 2:08 AM
  • Create a custom content type that contains all the fields that you need.

    Create a custom list defintion for the custom content type and you'll be laughing.

    You probablly want to take a look at VSeWSS http://www.microsoft.com/downloads/details.aspx?familyid=3E1DCCCD-1CCA-433A-BB4D-97B96BF7AB63&displaylang=en and the associated User Guide http://www.microsoft.com/downloads/details.aspx?FamilyID=A8A4E775-074D-4451-BE39-459921F79787&displaylang=en
    Wednesday, May 14, 2008 2:12 AM
  • Thanks,

    Wednesday, May 14, 2008 2:17 AM