I have a Custom Sharepoint field that inherits from SPFieldMultiColumn
. the values of the field appear like this:
";#column one value;#column two value;#column three value;#"
I want to display each item in a separate line and remove the
;#
I checked this link http://msdn.microsoft.com/en-us/library/ms411957(office.12).aspx and found that this can be achieved by overriding the render pattern of the field like this
<RenderPattern Name="DisplayPattern" DisplayName="DisplayPattern">
<Switch>
<Expr>
<GetVar Name="FreeForm"/>
</Expr>
<Case Value="TRUE">
<Column/>
</Case>
<Default>
<HTML>
<![CDATA[ <DIV ALIGN=RIGHT> ]]>
</HTML>
<Column/>
<HTML>
<![CDATA[ </DIV> ]]>
</HTML>
</Default>
</Switch>
</RenderPattern>
bu this requires that the number of SubColumns to be predefined, in my case it can be any number.
so I need a for loop to loop through each subcolumn in my multiple column field?
how can this be done ? thanks