This documentation is archived and is not being maintained.

SPFieldCollection Members

Windows SharePoint Services 3

Represents a collection of SPField objects.

The SPFieldCollection type exposes the following members.

  NameDescription
Public method SPFieldCollection Initializes a new instance of the SPFieldCollection class based on the specified Web site and schema.
Top

  NameDescription
Public property Count Gets the number of fields in the collection. (Overrides SPBaseCollection.Count.)
Public property Item[Guid] Gets the field with the specified identifier (ID) from the collection.
Public property Item[Int32] Gets the field object at the specified index in the collection. In Microsoft C#, this property is an indexer for the SPFieldCollection class.
Public property Item[String] Gets the field with the specified display name from the collection. In Microsoft C#, this property is an indexer for the SPFieldCollection class.
Public property List Gets the parent list of the collection.
Public property SchemaXml Gets the schema that defines the collection.
Public property UpgradedPersistedProperties Gets the collection of field names and values for fields that were deleted or changed. (Inherited from SPAutoSerializingObject.)
Public property Web Gets the parent Web site of the field collection.
Top

  NameDescription
Public method Add(SPField) Adds a field to the collection based on the specified field.
Public method Add(String, SPFieldType, Boolean) Creates a field in the collection based on the specified display name, field type, and Boolean value.
Public method Add(String, SPFieldType, Boolean, Boolean, StringCollection) Creates a field in the collection based on the specified display name, field type, Boolean values for other field properties, and choices in the case of a Choice field.
Public method AddFieldAsXml(String) Creates a field based on the specified schema.
Public method AddFieldAsXml(String, Boolean, SPAddFieldOptions) Creates a field based on the specified schema, Boolean value, and field options.
Public method AddLookup(String, Guid, Boolean) Creates a lookup field in the collection of fields for a list, based on the specified display name, lookup list identifier (ID), and a Boolean value that specifies whether the field is required. A lookup field refers to values from a field in another list.
Public method AddLookup(String, Guid, Guid, Boolean) Creates a lookup field in the collection of fields for a list based on the specified display name, lookup list identifier (ID), Web site ID, and a Boolean value that specifies whether the field is required. A lookup field refers to values from a field in another list.
Public method Static member AddSPFieldCreatorDelegate Adds a callback to the list of callbacks that is associated with the fields in the SPFieldCollection that is maintained for multithreading and asynchronous communications.
Public method ContainsField Returns a Boolean value that indicates whether the collection contains the specified field.
Public method CreateNewField Creates a field based on the specified type name and display name.
Public method Delete Deletes the field with the specified internal name from the collection.
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public method GetField Returns the field with the specified internal name or display name from the collection.
Public method GetFieldByInternalName Returns the field with the specified internal name from the collection.
Public method GetHashCode (Inherited from Object.)
Public method GetObjectData Retrieves the data required to serialize the object. (Inherited from SPAutoSerializingObject.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Protected method OnDeserialization Called after the object has been deserialized from the file system cache or the database. (Inherited from SPAutoSerializingObject.)
Public method ToString (Inherited from Object.)
Protected method UpdateParent Causes the containing SPPersistedObject, if one exists, to update its state. (Inherited from SPAutoSerializingObject.)
Top
Show: