tags:

views:

197

answers:

2

Hi

I've got a requirement to hold a DateTime value in a SharePoint field but to customise the display in a list view so that it shows as a mmmm string. The underlying value must remain as the DateTime so the sort is chronological rather than alphabetical.

So I think that a Custom Field is the way to go, I'll also get some added benefit in restricting the user interface to a month picker so even if there is another solution I'll likely go down this route to get that.

I've read that I can apply custom templates to the new, edit and display actions but I can't seem to find anything saying how to alter the list view (display patterns doesn't seem to be enough).

Anyone got any ideas?

Thanks

Justin

+1  A: 

I dont know if this is what you are looking for but I have used a solution with a custom fieldcontrol that overrides RenderFieldForDisplay like:

protected override void  RenderFieldForDisplay(HtmlTextWriter output)

This is a similar post:

http://stackoverflow.com/questions/997448/how-to-manage-column-based-access-control-in-sharepoint-lists/997773#997773

Johan Leino
Unfortunately this doesn't seem to help, I need to actually alter the way the value is rendered in the list mode. I've become convinced that the custom field control isn't called at all for the list mode.
Justin Waugh
+1  A: 

Ended up using a bit of an ugly series of <IfSubString> within the RenderPattern...

Justin Waugh