Click to Rate and Give Feedback

  Switch on low bandwidth view
Community Content
In this section
Statistics Annotations (0)
ListFieldIterator.IsFieldExcluded Method (Microsoft.SharePoint.WebControls)
Gets a value that indicates whether the specified field is excluded when the ListFieldIterator is rendered.

Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
Protected Overridable Function IsFieldExcluded ( _
    field As SPField _
) As Boolean
Visual Basic (Usage)
Dim field As SPField
Dim returnValue As Boolean

returnValue = Me.IsFieldExcluded(field)
C#
protected virtual bool IsFieldExcluded (
    SPField field
)

Parameters

field

The field whose exclusionary status is reported.

Return Value

true if the field is not rendered; otherwise, false.

In the default implementation, if either field.InternalName or field.Title is listed in ExcludeFields, IsFieldExcluded returns true.

CautionCaution:

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.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker