System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
In a list view of a document library in SharePoint 2010, when the document icon for an item in the Type column is clicked, the document is not offered for opening. Instead, the row for the item is selected. This behavior is different from SharePoint 2007
where clicking on the document icon opens the document itself.
This behavior is the result of the fact that in SharePoint 2010, the list view web part has been mostly replaced with the new and customizable XSLT List View Web Part. The XSLTListViewWebPart relies on XSLT files for rendering of items in the document library. Out of the box, it depends on the files main.xsl, fldtypes.xsl and vwstyles.xsl rendering of the document library views. These XSLT files are present in the following location:
\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\template\layouts\XSL
Among these files, the fldtypes.xsl is the file responsible for certain rendering of the XSLT views. The XSLT code that facilitates the rendering of icons in the document library view is located in this file. In the OOB environment, this XSLT code does not
generate a hyperlink for the icons.
Essentially, the solution involves using a separate xsl file with the desired rendering (including the link) for the document icons. This requires one-time implementation and the solution file should not be touched by any patches/upgrades. The following are the key points to note about this solution:
The solution is based on the fldtypes extensibility available in SharePoint 2010. This has been documented in the following link: http://msdn.microsoft.com/en-us/library/ff606773.aspx
(http://msdn.microsoft.com/en-us/library/ff606773.aspx)
The solution does not involve administrative overhead after the initial implementation. In addition, it should not be affected by the application of future updates and service packs to the SharePoint 2010 environment.
STEPS: ===================== 1. Create a text file using Notepad and copy the following XSLT code into the file. 2. Save the file as fldtypes_docicon.xsl and copy it into the Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\template\layouts\XSL folder on your WFEs. 3. Reset IIS and browse to the SharePoint site.
Using the full Anchor tag as shown above ensures that you get the complete collaboration functionality of SharePoint 2010 for Office documents including direct server edits, and WAC support. You should evaluate the solution in a test environment first to understand the acceptable performance characteristics for your scenario.
Depending on the functionality required, you can choose to either use the full Anchor tag as mentioned above or a partial tag with only the href attribute. i.e. <a onfocus="OnLink(this)" href="{$thisNode/@FileRef}">. The performance implications of using the partial tag as described above is negligible.
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use
(http://go.microsoft.com/fwlink/?LinkId=151500)
for other considerations.