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

I have added Comments field to a document library (list.Fields.Add(..)) in event receiver however when I a try to edit a document within this document library by chosing "Edit properties" the comment fields is not visible. How can I make Comments field visible in Edit Properties form? programmatically. thanks.

share|improve this question
add comment

2 Answers

On the SPField object, you can use the ShowInEditForm property to get/set whether or not to show it on the default Edit form. See MSDN for the reference: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfield.showineditform.aspx

share|improve this answer
    
I have tested the solution, it does not working. I think it is something special with comments field because all other fields show up in edit form. –  Medes Oct 17 '12 at 7:28
add comment

If the document library is using content types, then you need to add the field to the contenttypes in the library

share|improve this answer
    
I adde a fieldlink to the content type which the library uses but not working. i think it is something special with comments field because all other fields show up in edit from. –  Medes Oct 17 '12 at 7:29
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.