Share via


Delete(String) Method

The Delete method of the SPViewFieldCollection class deletes from the collection the field with the specified name.

Parameters

strField   A string that contains the field name.

Remarks

The Delete method requires that the Update method of the SPView class be called for changes to take effect in the database.

Example

The following code example deletes a field from the collection of view fields in a view of a specified list.

This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security