5

In Visual Studio 2010 when I create a List Definition the schemal.xml file looks something like this:

<Views>

  <View BaseViewID="0" Type="HTML" MobileView="TRUE" TabularView="FALSE">
    ....
    <ViewFields>
      <FieldRef Name="LinkTitleNoMenu"></FieldRef>
    </ViewFields>
    ....
  </View>



  <View BaseViewID="1" Type="HTML" WebPartZoneID="Main" DisplayName="$Resources:core,objectiv_schema_mwsidcamlidC24;" DefaultView="TRUE" MobileView="TRUE" MobileDefaultView="TRUE" SetupPath="pages\viewpage.aspx" ImageUrl="/_layouts/images/generic.png" Url="AllItems.aspx">
    ....
    <ViewFields>
      <FieldRef Name="Attachments"></FieldRef>
      <FieldRef Name="LinkTitle"></FieldRef>
    </ViewFields>
    ....
  </View>

</Views>

As you can see there are two views one with BaseViewID="0" and BaseViewID="1". If I want to show another column in view then I add a FieldRef tag in ViewFields of view with BaseViewID="1".

What is the purpose of the view with BaseViewID="0"? If I add new column to view with BaseViewID set to 0 nothing shows happens to default view and there are no additional views shown to me in List UI.

5

BaseViewID 0 is intended for using in views, which are added to home page! Remember, when you're adding a XsltListViewWebPart to a page, you can select to display "Summary view" in webpart properties. This is actually "BaseViewID=0" view.

Source: How can I use normal paging on a custom view?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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