I'm creating a sharepoint survey with VS2012.
I managed to create the survey with several question and here is some sample:
SPWeb web = properties.GetWeb(); Guid id = web.Lists.Add("survey", "desc", SPListTemplateType.Survey); SPList list = web.Lists[id]; string Question1 = "choose from option"; StringCollection collection1 = new StringCollection(); collection1.Add("opt 1"); collection1.Add("opt 2"); collection1.Add("opt 3"); list.Fields.Add(Question1, SPFieldType.Choice, true, false, collection1);
My question how can I add a question with type Rating Scale ?
I can't find any sample of doing this, maybe need to use (SPFieldRatingScale) but can't understand how.
Hope for any help or directions TIA