0

I have a listview webpart that used specific columns.

Changing the names of the columns is not an option.

Our users are insisting that the heading for these columns be updated, so I am thinking of using XSLT to achieve this. I believe it is possible using the XSL Link field of the webpart.

So, as an example, I have Column 1 | Column 2 | Column 3

and it must display as

Column A | Column B | Column CC

Does anyone have an example on how to do this?

1
  • Mahendran, usually when this situation occurs I make Calculated Fields for the columns with simple formula =[Field] and give column names as I want! and use calculated columns in XSLT... I know its not a healthy solution, but that's the only work around I have found... :) Oct 21, 2012 at 10:57

1 Answer 1

3

Having read up on the interwebs, I came across this (awesome) post:

Overriding the presentation of an xslt listview webpart

which basically covers how to do what I was trying to achieve.

The steps I took to get this right are as follows:

  1. Open up the page in SharePoint Designer and grab the xslt of the listview
  2. Save xslt into a .xsl file
  3. Update the file as you wish
  4. Upload the file to the layouts folder (this is important, read here for a full breakdown of why it Must be in this folder)
  5. Edit the xsl link field of the xslt listview, to point to your custom xsl file

Done :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.