ListFieldIterator.IsFieldExcluded method
Gets a value that indicates whether the specified field is excluded when the ListFieldIterator is rendered.
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Parameters
- field
- Type: Microsoft.SharePoint.SPField
The field whose exclusionary status is reported.
In the default implementation, if either field.InternalName or field.Title is listed in ExcludeFields, IsFieldExcluded returns true.
Caution
|
|---|
Because a field is excluded if either its InternalName or Title is included in ExcludeFields, when you create custom fields, you should not only keep each Title unique and each Internal Name unique; you should also ensure that no Title is the same as any other field's Internal Name. Otherwise, you might exclude two fields when you want to exclude only one. |
Even if field is not listed in ExcludeFields, the default implementation of IsFieldExcluded returns true in certain circumstances when it would be undesirable to render the field. For example, if the field appears somewhere else on the page anyway, it is not be rendered by the ListFieldIterator. Some of the other factors that the method takes into account are in the following list.
The value of the ControlMode property of the ListFieldIterator.
The value of field.ShowInDisplayForm.
The value of field.ShowInEditForm.
The value of field.Hidden.
The value of field.Type.
The base type of the containing list.
Caution