views:

23

answers:

0

I want to create a custom field that behaves exactly like the Lookup field type, allowing multiple selection, except that I want to modify the rendering of the items in the lists.

Each item in the list will have a button that displays the lookup options to enable / disable the desired boxes.

We have created a custom field in Visual Studio inheriting SPFieldLookup class without overriding any method. The behavior is exactly like the standard Sharepoint Lookup. Then, in the file data type definition "fldtypes_nnnnn.XML", in the include HTML code to show us the control we want. The problem we face here is that as the field allows selection of multiple values, the "Name = DisplayPattern RenderPattern" defined is applied to each of the selected items and not just once, with the result of painting one control for each selected item. What we want to achieve is showing a single control regardless of how many items are selected. Does anyone know how to solve this? Another way to implement this could be not modify the RenderPattern at the fldtypes.xml file, but customizing the ascx control, however it is not clear for me if this can be done, as the documentation I found on the web about this is quite confusing. Does anyone know if this can be done and how?