Export (0) Print
Expand All

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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

public bool PrependId { get; set; }

Property Value

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

ExceptionCondition
SPException

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.

Show:
© 2014 Microsoft