SPFieldLookup.PrependId property

Gets or sets a Boolean value that specifies whether to add item IDs to the beginning of items listed in selection boxes on forms.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public bool PrependId { get; set; }

Property value

Type: System.Boolean
true to add item IDs to items; otherwise, false.


Either the AllowMultipleValues property returns false or the LookupField property points to the ID field in the target list.

The PrependId property is intended for use with multivalue Lookup fields. Set the property to true to cause each of the field's values to render on New and Edit forms in the format "ID - Value", where ID is the value of the target item's ID field and Value is the value of the field in the target item that is identified by the Lookup field's LookupField property.