共用方式為


FldTypes.xml

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Each front-end Web server in a deployment of Windows SharePoint Services has one FLDTYPES.XML file located in the Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\XML folder that is used during site or list creation to define how field types are rendered in the different modes for viewing list data.

Warning

Modifying the FLDTYPES.XML file can break an installation of Windows SharePoint Services and is not supported.

File Format

The following excerpt outlines the format of FLDTYPES.XML:

<FieldTypes>
  <FieldType>
    <Field Name="TypeName">Counter</Field>
    <Field Name="TypeDisplayName">$Resources:core,fldtype_counter;</Field>
    <Field Name="InternalType">Counter</Field>
    <Field Name="SQLType">int</Field>
    <Field Name="ParentType"></Field>
    <Field Name="UserCreatable">FALSE</Field>
    <Field Name="Sortable">TRUE</Field>
    <Field Name="Filterable">TRUE</Field>
    <RenderPattern Name="HeaderPattern">
      ...
    </RenderPattern>
    <RenderPattern Name="DisplayPattern">
      ...
    </RenderPattern>
    <RenderPattern Name="EditPattern">
      ...
    </RenderPattern>
    <RenderPattern Name="NewPattern" DisplayName="NewPattern">
      ...
    </RenderPattern>
    <RenderPattern Name="PreviewDisplayPattern">
      ...
    </RenderPattern>
    <RenderPattern Name="PreviewEditPattern">
      ...
    </RenderPattern>
    <RenderPattern Name="PreviewNewPattern">
      ...
    </RenderPattern>
  </FieldType>
  <FieldType>
    ...
  </FieldType>
  ...
</FieldTypes>

RenderPattern elements define how an item is displayed in each of the possible modes for viewing list data. These modes include the header patterns used at the top of each list in the toolbar, the modes used in forms for displaying, editing, or creating items, and preview rendering patterns used by a Web-editing application that is compatible with Windows SharePoint Services, such as Microsoft Office SharePoint Designer 2007.

To create a custom field that derives from a base field type, you can add a field definition to the Schema.xml file of a custom list definition Feature. For a programming task that shows how to add a field to a custom list definition, see How to: Create a Custom List Definition. For information about creating a custom field type, see Custom Field Types.

See Also

Concepts

Custom Field Types

Other Resources

Columns