Software Technology Tips

Choice fields are often used within SharePoint lists to display choice options like Gender, Status, etc and these choice options can be displayed using Radio Button and Dropdown formats.
Provided below is a code sample in C#.Net which describes the creation of a choice field programmatically using SharePoint API.
/* get the newly added choice field instance */
SPFieldChoice chFldGender = (SPFieldChoice)lst.Fields["Gender"];
/* set field format type i.e. radio / dropdown */
chFldGender.EditFormat = SPChoiceFormatType.Dropdown;
/* set the choice strings and update the field */
/* finally update list */

Related Tags:

Sharepoint, C#

Author: Kaushik Mohanty

Related Pages

  • SharePoint Development India
  • SharePoint Application Projects


Let us Connect!

Awards and Achievements

Red Herringcolor DeloitteFast50 DB ZInnov1   Nascome  DB Stpi

This site uses cookies. We respect your privacy.copyright (c) Mindfire Solutions 2007-2015. Login