【发布时间】:2017-12-08 23:41:21
【问题描述】:
我正在尝试为 SharePoint 列表视图 Web 部件设置工具栏。我可以在 SSOM 中做到这一点,但在 CSOM 中不能。我尝试通过更新列表视图 webpart 的 XMLDefinition 属性中的 Toolbar 类型元素。但它没有用。 我也尝试通过获取 MethodInfo 如下。
Type[] toolbarMethodParamTypes = { Type.GetType("System.String") };
MethodInfo setToolbarTypeMethod = webpartView.GetType().GetMethod("SetToolbarType", BindingFlags.Instance | BindingFlags.NonPublic, null, toolbarMethodParamTypes, null);
但它返回 null。
有没有其他方法可以实现这一点?
【问题讨论】:
标签: sharepoint web-parts csom