Building a Drop-Down menu in DataView Edit Template

The important things are:

The ID must be unique, this is usually the ff1 style name.

The beginning of the DataBind must have ‘u’ for an edit, I assume this means update.  Sometimes it may say ‘I’, this is for new or insert commands.

<SharePoint:FormField runat=”server” id=”ff1{$Pos}” ControlMode=”Edit” FieldName=”ChoiceColumn” ItemId=”{@ID}” __designer:bind=”{ddwrt:DataBind(‘u’,concat(‘ff1’,$Pos),’Value’,’ValueChanged’,’ID’,ddwrt:EscapeDelims(string(@ID)),’@ChoiceColumn’)}”/>

Remember that ff1{$Pos} and ‘ff1’ in the DataBind must be changed and match each other within the control.  ff1 can be changed to anything without spaces.  Also the FieldName=”ChoiceColumn” should match the proper name you have for the column and the DataBind should match the @ name for the column.

Comments

Popular posts from this blog

SharePoint Designer 2013 Approval Workflow with Comments

Change SharePoint server hostname and Web Application Names

SharePoint Search - Content Processing Pipeline Failed to Process the Item