jeudi 5 février 2015

What is purpose of 'View' with 'BaseViewID' set to '0' in schema.xml of List Definition?



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.








0 commentaires:

Enregistrer un commentaire