Wednesday, November 5, 2014
Add Multiline Text with Enhance Rich option in Clintobject Model
Create Multiline Text
Field styleField = list.Fields.AddFieldAsXml(" ", true, AddFieldOptions.DefaultValue);
FieldMultiLineText fieldMultiLineText = context.CastTo(styleField);
fieldMultiLineText.RichText = true;
fieldMultiLineText.AllowHyperlink = true;
fieldMultiLineText.UpdateAndPushChanges(true);
list.Update();
context.ExecuteQuery();
Create Multiline Text with ich text option
Field styleField = list.Fields.AddFieldAsXml(" ", true, AddFieldOptions.DefaultValue);
FieldMultiLineText fieldMultiLineText = context.CastTo(styleField);
fieldMultiLineText.RichText = true;
fieldMultiLineText.AllowHyperlink = true;
fieldMultiLineText.UpdateAndPushChanges(true);
list.Update();
context.ExecuteQuery();
created Enhanced rich text column and use the SchemaXML to generate the new field:
Field rtfField = list.Fields.AddFieldAsXml(" "
, true, AddFieldOptions.DefaultValue);
rtfField.UpdateAndPushChanges(true);list.Update();
context.ExecuteQuery();
RestrictedMode=\"TRUE\" RichText=\"TRUE\" RichTextMode=\"FullHtml\"
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment