SPView.Clone Method
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)
精彩评论