You are here : Blog
Search_Blog Minimaliseren

KHSW Soft Blog Minimaliseren

I wanted to add a column to a list to store a date based on some heavy business-logic (the calculated column could not be used for this). The end user needs to be able to see the contents of this column, but should not be able to modify it. Walking through the Sharepoint object model I discovered the CreateNewField Function on the SPFieldCollection in the desired list. This (at the moment almost undocumented) function needs two parameters: - typeName As String - displayName As String and is returning a SPField. I had some trouble with the first parameter as it was not clear what exact it was expecting, most of the time the function just throwed a null reference exception (guessing because the errormessage still doesn't exist in the resource file). So I did some investigation with Reflector. The typeName is expected to be one of the members of Microsoft.SharePoint.SPFieldType enumeration ("DateTime" in my case). Dim sps As New...

Read More »


Copyright 2007 by KHSW Soft BVBA
PrivacybeleidGebruiksovereenkomst