Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Programmatically altering SPList.DefaultView but ListViewWebPart still show old columns

$
0
0

I have a site definition in which I add a <View /> which point to a task list which I create programmatically via a feature.

The feature adds a list to the current site that it gets activated on and it alters the defaultview, adding some new fields and sorts by Due Dates. The DefaultView is only supposed to display 3 columns; title, assigned to, due date.

The list creation and view altering all works perfectly, however the listviewwebpart which I have set to display BaseViewID="1" which is the defaultview still displays all the "old" columns (the out-of-the-box columns). It only shows the correct view if I manually edit the listviewwebpart after site creation.

How do I make it show the updated view?


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>