Blog Archive

Sunday, March 11, 2012

Removing Link from Lookup column in Data View WebPart

As I have started working more on Client Side SharePoint Programming, I come to know that lot of things are possible with Data View Webpart and they are very much powerful.

In most of the time when we are using DataView Webpart and if there is a Lookup column then by default it creates the link for it. Now if you want to remove this link there is a simple trick in the XSLT.

Please see the code below to remove this link. This is XSL value of tag and in select you can use the following XSLT syntax. Also use Disable Output Escaping attribute to Yes.

select="substring-before(substring-after(@FieldInternalName,'>'),'<')" 

Feel free to use this XSLT and it will save your lot of time!!!

No comments:

Post a Comment

Post a Comment