locked
What is BaseViewID in Sharepoint list view element? RRS feed

  • Question

  • Hi,
    I have created a custom doument library schema by copying the existing DoumentLibrary feature, and have added couple of extra columns and views in my custom document library schema.
    The view with BaseViewId=3 always dosent show New and Upload buttons on the toolbar of the list view(After a creating the list based on my new custom doument library schema), but all the other view shows the New and Upload buttons on the list view toolbar.
    The view element is given below.
    <View Name="{22DD0D2B-B2B0-4bf4-A520-C798365A5645}" WebPartZoneID="Main" SetupPath="pages\viewpage.aspx" Type="HTML" Scope="Recursive" DisplayName="My View" Url="MyView.aspx" BaseViewID="3" ImageUrl="/_layouts/images/dlicon.png">

    If i give BaseViewId other than the value 3, the same view shows  New and Upload action button on the view toolbar.
    I looked for the  WSS SDK description for BaseViewID attribute of view element but i got no useful discription.



    mallikarjun
    Tuesday, August 11, 2009 12:40 PM

Answers

  • The baseviewid must be unique within the view collection for that list.  It should also increment from 0.
    It's the way to identify the view when creating listviewwebparts.

    Maybe there's already a baseviewid=3 view assigned in the list schema and that particular view doesn't have the toolbar.
    • Proposed as answer by Peter Holpar Tuesday, August 11, 2009 4:09 PM
    • Marked as answer by Mike Walsh FIN Friday, February 12, 2010 5:16 PM
    Tuesday, August 11, 2009 2:23 PM

All replies

  • The baseviewid must be unique within the view collection for that list.  It should also increment from 0.
    It's the way to identify the view when creating listviewwebparts.

    Maybe there's already a baseviewid=3 view assigned in the list schema and that particular view doesn't have the toolbar.
    • Proposed as answer by Peter Holpar Tuesday, August 11, 2009 4:09 PM
    • Marked as answer by Mike Walsh FIN Friday, February 12, 2010 5:16 PM
    Tuesday, August 11, 2009 2:23 PM
  • Hi Brian,
    In my custom doument library schema i have maintained the uniqueness for BaseViewId, And even i verified that there is no other view with the BaseViewId=3 in the schema definition.
    But my problme still exists.


    mallikarjun
    Wednesday, August 12, 2009 8:46 AM
  • Hi,

    I'd the same problem. It seems to be a feature of BaseViewID 3, so try a different ID. It does have to be a unique number, but it doesn't appear to have to be part of a sequential set. Having views defined for BaseViewIDs {0,1,7,11} is still valid.

    Andy
    Wednesday, December 9, 2009 10:05 AM