开发者

SPView.Clone Method

开发者 https://www.devze.com 2022-12-15 05:31 出处:网络
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 in开发者_开发百科

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 in开发者_开发百科tact 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...


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)

0

精彩评论

暂无评论...
验证码 换一张
取 消