views:

63

answers:

1

I have a custom field in sharepoint 2007.

What I want to do is add a custom setting to it that appears not in individual items but is a property you set when you create a column. I'd like it such that any of that column can access that property but other columns can be made of my field with their own setting.

Most of the examples/tutorials/documentation I've found seem to be either incomplete or trying to accomplish something completely different.

What functionality should I be looking at in order to accomplish this??

+1  A: 
  1. Add a property to the custom field class (that's the one that inherits from SPField, SPFieldLookup or something similar); read this post to learn how to save the value of the custom property.
  2. Add appropriate UI elements to the FieldEditorUserControl control.

Also, check this project (source code is available).

Marek Grzenkowicz
I see the that project you linked actually uses the "PropertySchema" element in its fldtypes xml. Can that contain a lookup?
McAden
@McAden I have no idea it can be achieved using the `PropertySchema` element. However, you can specify a custom field editor control in `FieldEditorUserControl` property http://msdn.microsoft.com/en-us/library/ms472859.aspx and such custom control can contain virtually anthing. `FieldEditorUserControl` is used in this project http://filteredlookup.codeplex.com/.
Marek Grzenkowicz