【发布时间】:2018-04-07 11:44:02
【问题描述】:
我正在将网站栏添加到文档库默认视图中,并希望在您单击列表本身时显示/显示它。但是,我不确定如何执行此操作。我到目前为止的代码
// Get the view (this is the default view)
Microsoft.SharePoint.Client.View v = Employeecvlist.GetViewByName("All Documents");
// Load it up
clientContext.Load(v, x => x.ViewFields);
clientContext.ExecuteQuery();
// Get the field I want to add to the view
Microsoft.SharePoint.Client.Field name =
Employeecvlist.Fields.GetByInternalNameOrTitle("Name");
clientContext.Load(name);
clientContext.ExecuteQuery();
// Add this field to the view !! Nothing else in the view object to allow to make it visible by default !!
v.ViewFields.Add(name.InternalName);
// Finally, update the view
v.Update();
如果您查看下面的图像文件,我基本上希望能够将上述字段的“显示”复选框选中为真。
有人能指出我正确的方向吗?
谢谢
【问题讨论】:
标签: sharepoint sharepoint-online csom