Monday, June 6, 2016

Choice values from SharePoint List C#




public void createCategoryColumnType(SPList list)
        {
            List<string> Choices = null;

            SPFieldChoice fieldChoice = (SPFieldChoice)list.Fields.GetFieldByInternalName("Category");

             Choices = new List<string>();

             foreach (string choiceName in fieldChoice.Choices)
             {
                 Choices.Add(choiceName);
             }
          
        }

No comments:

Post a Comment