Welcome to DetlefGrohs.com Sign in | Join | Help

SharePoint (RSS)

SharePoint 2007 Links

My list of SharePoint 2007 Links and Blogs that I monitor and refer to when I need help. By no means an exhaustive list. I will be adding to this as I come across more sites: http://jopx.blogspot.com/ - JOPX on SharePoint 2007 (MOSS and WSS V3 ), Office
posted by detlef | 0 Comments
Filed Under:

What I Learned Last Night

Was working with web part pages in a document library in SharePoint 2007 and could not understand why the web parts that I added were not showing up in the contents of the file when I referenced the SPListItem.File.OpenBinaryStream method. The contents
posted by detlef | 0 Comments
Filed Under: ,

SPListExists SharePoint 2007 Code Snippet

I use this method whenever I need to determine if a List exists in SharePoint 2007. I have not found a built in method for this yet. I hope there is one, but until I find it, this works. I don't use this in production code, only for deployment and test
posted by detlef | 0 Comments
Filed Under: ,

RunWithElevatedPrivileges SharePoint 2007 Code Snippet

Here is a common piece of code that I have been using when writing Web Parts, Event Receivers and Activities for SharePoint 2007. When any calls to the SharePoint API are run in the context of the user that initiated the action. This can pose a problem
posted by detlef | 0 Comments
Filed Under: ,

Adding Choice Site Column Code Snippet

This code snippet shows how to add a choice field as a site column in SharePoint 2007. spweb.Fields.Add("MySiteColumn", SPFieldType.Choice, false); SPFieldChoice field = (SPFieldChoice)spweb.Fields[fieldname]; field.Group = "MyGroup";
posted by detlef | 0 Comments
Filed Under: ,

DateTime Site Column Code Snippet

Another code snippet that creates a Date/Time site column in SharePoint 2007. I need to collect all of these field creation code snippets into a longer more comprehensive post. spweb.Fields.Add("MyDateTimeField", SPFieldType.DateTime, false);
posted by detlef | 0 Comments
Filed Under: ,

Read Document Contents Code Snippet

The following code snippet will load the contents of a item in a document library in SharePoint 2007. I am loading the contents of the first item, but you could easily use Items.GetItemById() method to get a relevant item. SPList list = spweb.Lists["MyList"];
posted by detlef | 0 Comments
Filed Under: ,