I need to edit a field (ChoiseType) only one (not all) element in a list.
Use the following code:
SPListItemCollection elementoLista = ricavoElements.elementilistafiltrati(Id_richiesta, nomeLista, ref properties);
foreach (SPListItem item in elementoLista)
{
SPFieldChoice dropDown = (SPFieldChoice)item.Fields["Stato Richiesta"];
dropDown.Choices.Clear(); // Elimino gli stati precedenti
foreach (SPListItem elemento in collListItems)
{
string stato = elemento["stati"].ToString();
dropDown.Choices.Add(stato);// imposto il nuovo stato
}
dropDown.Update();// faccio l'update
Unfortunately change the choices of ALL the items on the list ...
Do you have an idea how can I do?
thanks