When creating a custom field in SharePoint 2010, what method do I need to override to control what is rendered for the custom field type in the list where it is used?
I tried overriding GetFieldValue to no effect.
|
When creating a custom field in SharePoint 2010, what method do I need to override to control what is rendered for the custom field type in the list where it is used? I tried overriding |
||||
|
|
@Marek is right in his assertion that you should use XSLT. However, in 2010 (only) there are functions you can override to alter a field's output:
Each of these accepts an The output from whichever of these functions is used is then pushed through the XSLT (if you've provided any) and rendered. I haven't seen any examples of this method being used in the wild, however (we don't use it due to 2007 incompatibility) so I'd advise caution. |
|||||||||||
|
|
SharePoint 2010 renders fields on a list view is with XSLT style sheets, so there is no method to override. If you want a your own way of rendering on list views, you need to create a custom XSLT style sheet named
|
||||
|
|
|
A field type's rendering can be controller by binding it to a BaseFieldControl derived custom control: http://www.chakkaradeep.com/post/SharePoint-Creating-a-custom-field.aspx |
|||||
|