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 created a custom ListForm template and overide the IsFieldExcluded method. I am wondering why some fields in my situation are returning true and others are returning false.

What is the dependency of the value of the method:

IsFieldExcluded(Microsoft.SharePoint.SPField field)

Is it maybe if the field is set on hidden in the content type or something?? When is a field excluded?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

The following parameters indicates whether the specified field is excluded when the ListFieldIterator is rendered.

SPField properties

  • ShowInDisplayForm - value that specifies whether the field is displayed in the form for displaying list items
  • ShowInNewForm - value that specifies whether the field is displayed in the form that is used to create list items
  • ShowInEditForm - value that specifies whether the field is displayed in the form that is used to edit list items
  • Hidden - value that specifies whether the field is displayed in the list
  • Type - value that specifies the type of field. Depending on control modes some field types are not rendered, for example field with type PageSeparator is not rendered in Display mode
  • InternalName - Gets the internal name that is used for the field. For example field identified by internal name "ContentType" (Content Type) is not rendered.
  • SPFieldCalculated - Represents a calculated field in a list. This field is rendered in Display control mode only.

ListFieldIterator properties

share|improve this answer
    
Damnnn what a good answer. Thanks vgrem!! –  KHA Feb 8 '13 at 11:01

According to the MSDN: Gets a value that indicates whether the specified field is excluded when the ListFieldIterator is rendered.

For more information: http://msdn.microsoft.com/en-gb/library/microsoft.sharepoint.webcontrols.listfielditerator.isfieldexcluded.aspx

share|improve this answer

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.