I have the following XsltListViewWebPart on a custom application page:

<WebPartPages:XsltListViewWebPart runat="server"
    Title="My Documents"
       <View MobileView="TRUE" Type="HTML" Level="1">
                        <FieldRef Name='MyDocMyId'/>
                        <Value Type='Text'>{controlMyID}</Value>
               <FieldRef Name="DocIcon"/>
               <FieldRef Name="Title"/>
               <FieldRef Name="MyDocType"/>
               <FieldRef Name="MyDocDate"/>
               <FieldRef Name="MyDocNotes"/>
           <RowLimit Paged="TRUE">30</RowLimit>
           <Toolbar Type="FreeForm"/>
       <!-- ootb bindings snipped -->
       <ParameterBinding Name="controlMyID" Location="Control(myDocMyId,Value)" DefaultValue="0" />

It's working great, except it is rendering with the New/Upload/Actions/Settings/View toolbar. If I remove the ViewGuid attribute, the toolbar goes away, but the web part renders using 2007-ish table-based HTML.

Is there a way to configure a XsltListViewWebPart using a custom view so that it has the same XSLT look and feel, but does not show the toolbar?


You can think of using Permissions to hide the toolbar. I guess the toolbar is displayed only if the role has "Full Control" and/or "Design". I assume most of your site users will not have these permissions? Removing them should get rid of the toolbar!


Change the <Toolbar Type="FreeForm"/> to <Toolbar Type="None"/>

  • No change. And, according to MSDN, the only values are Standard and FreeForm. – Rich Bennema Mar 12 '12 at 15:57
  • try removing the toolbar attribute entirely. – Vardhaman Deshpande Mar 12 '12 at 16:10
  • No difference there either. My first version didn't have the Toolbar element or the ShowToolbarWithRibbon attribute. Adding them didn't change anything, but I included them in my question for completeness. – Rich Bennema Mar 12 '12 at 16:25

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.