SPView.Clone方法
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信克隆-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)