SPList list = site.Lists["Demo"];
StringCollection choices = new StringCollection();
choices.Add("AP");
choices.Add("MP");
choices.Add("HP");
list.Fields.Add("State", SPFieldType.Choice, false, false, choices);
SPFieldChoice fldChoice = (SPFieldChoice)list.Fields["State"];
fldChoice.EditFormat = SPChoiceFormatType.Dropdown;
fldChoice.Update();
list.Update();
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment