Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
add comment

3 Answers

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/

share|improve this answer
    
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 Apr 25 '13 at 8:20
add comment

Try this link

share|improve this answer
1  
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. –  Stuart Pegg Aug 16 '12 at 15:08
add comment

Try;

calView = new SPCalendarView();
calView.ViewType = "week";
share|improve this answer
    
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? –  user259 Aug 17 '10 at 16:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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