Tuesday, December 14, 2010

Change View headers in SharePoint 2010

For changing the view Headers you need the SharePoint 2010 Designer.

To start modifying your view select the “Edit List in SharePoint Designer” or simply open the designer and navigate to your list

SNAGHTML1ee2bedd

Click on the placeholder that has the View Web part to enable the ribbon tools.

SNAGHTML1ee7bfb8

Click List View Tools –> Design, and Choose Customize XSLT – Customize Entire View,  to enable editing of the xslt.

SNAGHTML1ee9f394

Click on a header, and replace the xslt in the codeview. The default xslt will be <xsl:value-of select="$fieldtitle"/> replace with something like <xsl:text disable-output-escaping="yes">Your new header</xsl:text>

Now for the important part:

You must remove all ddwrt:ghost="hide" attributes in your view. If these attributes exists the view will not be correctly saved. Do a search replace and save the “file”.

Before:

SNAGHTML1ee50b29

After:

SNAGHTML1ef12b85

3 comments:

Pete Bronken said...

Awesome, thanks for the tip.

Manish said...

Hi Henry,
i followed your steps, but unfortunately its not being reflected. When i see in designer, i can see the text change then i save the page and when i view in the browser, the text is as it is. its not updated.

Please help.

Thanks,
Manish

Manish said...

Thanks Henry, it worked for me. I deleted all the occurences of ddwrt:ghost="hide" and it worked like a magic.

Thanks for your post.


Regards,
Manish