SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a Calendar list via Visual Studio 2012. I have added a new Custom View to the Schema.xml file and removed all other views. this calendar list deployed by a feature. I have a custom web template with a custom default.aspx file, this default.aspx file is deployed by a Module. within elements.xml of this Module I have added a view element which uses the calendar list as list view web part. When I create a site based on my web template everything works, but the calender uses the normal View (Calendar view) not my view, even I have deleted all other views. so I need to change the view manually. what must I do to make my view be chosen when you create a site based on my web template? following is a part of elements.xml and schema.xml files. elements.xml of the module which adds default.aspx

<View List="Lists/MyCalendar" BaseViewID="0" DefaultView="TRUE" RecurrenceRowset="TRUE" WebPartZoneID="peRow2Column3" WebPartOrder="0" >
       <WebPart xmlns="">

schema.xml of MyCalendar list

  <View BaseViewID="0" Type="HTML" Name="371903AD-349D-45B2-B882-7C5DEE528C21" WebPartZoneID="peRow2Column3" DisplayName="my view" SetupPath="pages\viewpage.aspx" MobileDefaultView="TRUE" Url="CustomRendering.aspx"  DefaultView="TRUE">
share|improve this question

Finally I found the answer for this problem.

I need to use XsltListViewWebPart instead of ListViewWebPart for the List View Web part in elements.xml

share|improve this answer

My assumption is that the BaseViewID is already being used by SharePoint for the default calendar list. Have you tried bumping that number up to something like 100 just to be safe?

share|improve this answer
Thank you Matt, I changed it to 100 but still it chooses the default view of Calendar. – Medes Apr 10 '13 at 8:46

Your Answer


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.