SPView.Clone方法

发布于 2024-08-16 09:14:47 字数 140 浏览 3 评论 0原文

我在 Web 部件中显示一个视图,并更新此视图以根据登录用户的组过滤列表项。有没有一种方法可以克隆视图并更新它,同时保持原始视图不变?我需要这个克隆视图是临时的,因为渲染后我不需要它。
我知道有一个 SPView.Clone 方法,但它的记录很少......

I'm showing a view within a webpart and I update this view to filter the list items according to the logged on user's groups. Is there a way to clone the view and update it leaving intact the original one? I need this cloned view to be temporarary since I don't need it after rendering it.

I know there's a SPView.Clone method but it's little documented...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

太阳公公是暖光 2024-08-23 09:14:47

我相信克隆-d 视图将被持久化到数据库中。您可以查看 ListViewByQuery 类。

编辑:示例+解释可以在这里找到:http://karinebosch。 wordpress.com/sharepoint-controls/the-listviewbyquery-control/ (这甚​​至展示了如何在此类视图中使用分组)

I believe the clone-d view will be persisted to the database. You can take a look at ListViewByQuery class.

EDIT: An example + explanation can be found here: http://karinebosch.wordpress.com/sharepoint-controls/the-listviewbyquery-control/ (this even shows how to use grouping in such views)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文