Editing SPView objects

SharePoint Short #14

Making a change to a SPView object directly will not work:

listObject.DefaultView.Title = "new title";

What you should do is instantiate a new variable from the view you want to make changes to:

SPView view = listObject.DefaultView;
view.Title = "new title";

Leave a Reply

Your email address will not be published. Required fields are marked *

Solve the maths problem shown below before posting: *


Get every new post delivered to your Inbox

Join other followers: