Is it possible to programmatically change a “multi-line text field” to “single-line text field” ?
SPFieldMultiLineText field = list.Fields["sample"] as SPFieldMultiLineText;
// how to change the type to 'single line' now ?
Or do I need to create an additional field (with a similiar name) and migrate the content?
Thanks for any help.
You can change a Note (MultiLineText) field into a Text (SingleLineText) field under certain restrictions.
The code is simply as follows. You don’t even need to specify that it is MultiLine.