Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.

Sponsors

News

 
 
 
 
 
DZone MVB

Links

Social

SharePoint: How to find DispForm.aspx toolbar

I needed list item display view toolbar on one of the custom forms. It wasn’t very easy to find it from many files but I found it. Here it is.

<script>
            recycleBinEnabled = <SharePoint:ProjectProperty Property="RecycleBinEnabled" runat="server"/>;
</script>
<wssuc:ToolBar  CssClass="ms-toolbar" id="toolBarTbl" runat="server" FocusOnToolbar=true>
    <Template_Buttons>
        <SharePoint:EnterFolderButton runat="server"/>
        <SharePoint:NewItemButton runat="server"/>
        <SharePoint:EditItemButton runat="server"/>
        <SharePoint:EditSeriesButton runat="server"/>
        <SharePoint:DeleteItemButton runat="server"/>
        <SharePoint:ClaimReleaseTaskButton runat="server"/>
        <SharePoint:ManagePermissionsButton runat="server"/>
        <SharePoint:ManageCopiesButton runat="server"/>
        <SharePoint:ApprovalButton runat="server"/>
        <SharePoint:WorkflowsButton runat="server"/>
        <SharePoint:AlertMeButton runat="server"/>
        <SharePoint:VersionHistoryButton runat="server"/>
    </Template_Buttons>
</wssuc:ToolBar>

So if you need DispForm.aspx toolbar then take this code or open file C:\Program Files\Common Files\microsoft shared\Web Server Extensions\12\TEMPLATE\CONTROLTEMPLATES\DefaultTemplates.ascx and search for DisplayFormToolBar.

Posted: Apr 05 2009, 08:30 PM by DigiMortal | with 4 comment(s)
Filed under:

Comments

Links (4/9/2009) « Steve Pietrek - Everything SharePoint and Office said:

Pingback from  Links (4/9/2009) &laquo; Steve Pietrek - Everything SharePoint and Office

# April 9, 2009 7:22 PM

sulumits retsambew said:

good article and keep posting thank you

# June 9, 2009 5:56 PM

Jay said:

Is there a way in which I can conditionally hide the buttons which are showed in the toolbar.

So lets say that I want to hide the Approve / Reject Items link on the toolbar permanently. Can this be done.

I tried commenting out the,

<SharePoint:ApprovalButton runat="server"/>

line from DefaultTemplates.ascx. But the link still appears.

Any suggestions?

Jay

# May 6, 2010 7:21 AM

Kathe said:

Hi,

Try this:

<SharePoint:ApprovalButton runat="server" Enabled="false"/>

# July 14, 2011 3:09 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)