Creating Custom Field Types

While SharePoint allows you to create many different types of site columns, you will find yourself at times creating custom site column types. For example, you may want to create a new site column type that displays a drop-down list that gets data from the database or some other source. To create a custom site column type you need to create the following:

• A new field type class. This is a class that must inherit from Microsoft.SharePoint.SPField or one of its inherited classes.

• A new field type definition. This is defined in an XML file that has a naming convention such as fldTypes_*.xml and is deployed to <14 hive>\Template\XML. The field definition file tells SharePoint information related to the field type such ...

Get Sams Teach Yourself SharePoint® 2010 Development in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.