Custom Render Pattern for complex field

I have list with many fields, one of the fields contains complex data (for example xml data). I want to show list item standard way, but render this complex field not as text it contains, but my own render logic.

Any one know how to do such thing ? I have two ideas - rewrite full dispform page with custom code (but i don't know what fields list would contains), or rewrite IListIterator. May be there is another way ?Smile

Thanks

[530 byte] By [Mikaelo] at [2008-1-1]
# 1
You may want to take a look at the dataview option from frontpage (sharepoint designer). basically it allows you to specify the xslt that renders the view. If you can come up with an xslt that will get the xml in the field and then run another xslt operation on it to format it like you want - you got a cheap solution!
IshaiSagi at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Development and Programming...
# 2

Yes, but my custom list is only base list, users can create as many new fields in it as they want, so i can't use xslt, because don't know fields... i looking for method to override rendering of my field only.

Mikaelo at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Development and Programming...
# 3

I may simply create own custom field type with custom RenderingControl.

see http://msdn2.microsoft.com/en-us/library/ms446361.aspx, and for example this article http://www.sharepointblogs.com/jimyang/archive/2006/07/09/9025.aspx

there are many articles around this question in the web.

I hope this help

RailSabirov at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Development and Programming...
# 4

All this articles are about creating custom rendering control for edit mode of list item.

Display form, what you see in DispForm.aspx - is described in BaseFieldClass control or in Render Pattern, example:

<RenderPattern Name="DisplayPattern">
<Switch>
<Expr>
<Column />
</Expr>
<Case Value="" />
<Default>
<HTML><![CDATA[+]]></HTML>
<Column SubColumnNumber="0" HTMLEncode="TRUE" />
<HTML><![CDATA[(]]></HTML>
<Column SubColumnNumber="1" HTMLEncode="TRUE" />
<HTML><![CDATA[)]]></HTML>
<Column SubColumnNumber="2" HTMLEncode="TRUE" />
</Default>
</Switch>
</RenderPattern>

But i need to create my custom rendering for display, not edit...

Mikaelo at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Development and Programming...
# 5

BaseFieldClass can be used for display field also.

simply try to override for Render method for proof this.

RailSabirov at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Development and Programming...
# 6
You can't have a custom rendering method called in the ListViewWebPart (the default list view). If you use a dataform web part you can though.
PatMiller-MSFT at 2007-9-12 > top of Msdn Tech,SharePoint Products and Technologies,SharePoint - Development and Programming...

SharePoint Products and Technologies

Site Classified