2008-01-29

Modify FldTypes.xml to add custom field types and/or change display properties

FldTypes.xml

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.

File Format

The following excerpt outlines the format of FLDTYPES.XML:

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.

No comments :

Post a Comment