Search code examples
c#sharepointmoss

Sharepoint 2007 C# add multichoice field as checkboxes


I'm developing a Sharepoint 2007 application with Visual Studio 2008 / C#.

I have a FeatureReceiver to build lists programatically on feature activation. That all works fine.

Normal Mutichoice field can be added this way:

myList.Fields.Add(title, type, required, false, choices);

My question is: How can I add a Multichoice field as checkboxes to my list?

Thanks


Solution

  • You need to use SPFieldType.MultiChoice for 2nd parameter...