Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Here is the sample code,
SPWeb web = new SPSite("https://karthick64:4040/").OpenWeb();
SPField spField = web.Fields["MyChoice"];
SPFieldChoice choiceFields = (SPFieldChoice)spField;
string[] choices = new string[3] {"x", "y", "z"};
foreach (string choice in choices)
{
choiceFields.Choices.Add(choice);
}
choiceFields.Update();
Keep Exploring... :)
Comments
Anonymous
May 22, 2007
Here is the sample code, SPWeb web = new SPSite(" http://karthick64:4040/").OpenWeb (); SPFieldAnonymous
August 09, 2011
I need to set selecteditemchange event for SPFieldChoice. Can it be done? is there a workaround?