What if you want to enable a column only if the user has permissions?
Now you might have worked with Item Level permissions but what when you wanna show the record to all users but just disable a COLUMN to particular users.
For e.g. for a SharePoint library which contains infopath form you want to display all forms to all users but only let few users EDIT them.
All this is done in SharePoint designer. Convert your ListView to Data view and then follow the steps below:
Create new site column (hyperlink) in DataView:
<a href="http://yourinternalsite/_layouts/FormServer.aspx?XmlLocation=http://yourinternalsite/subsite/FocusReports/{@FileLeafRef}&OpenIn=Browser">Edit</a>
And add the following code to the column created above:
Show/Hide Edit column based on security (read only users will not see the column)
<xsl:if test="ddwrt:IfHasRights(4)">
Isn't it simple !
Enjoy programming !!