3

I can create a calendar view in code, however I have as yet been unable to figure out how to change the "Default Scope" (this is the name that appears in the user interface when editing a calendar view). The options in the user interface are Day, Week, or Month - Month being the default. I'd like to be able to change the default to something else, Week for example, but I cannot figure out how to do it, other than using the user interface.

3 Answers 3

1

Try;

calView = new SPCalendarView();
calView.ViewType = "week";
1
  • 1
    I've seen that, but as far as I can tell that only relates to adding a view to a web part? If I have access to the SPView object, how do I then use your code?
    – Zarek
    Commented Aug 17, 2010 at 16:14
-1

Try this link

0
-1

You can't do it through API. By sending RPC call to owssvr.dll is the only other way other than UI. For complete solution, visit this link -

http://www.manvir.net/change-the-default-scope-of-sharepoint-calendar-view-to-week/

1
  • 1
    While this may theoretically answer the question, we prefer inclusion of the essential parts of the answer here, and to provide the link for reference. See answer for general guidelines. Also we require disclosure of any affiliation with products or websites. Please see May I promote products or websites I am affiliated with here? for guidelines.
    – SPDoctor
    Commented Apr 25, 2013 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.