Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm creating a new custom field type to go with my custom document library.

What I want to do is to have the column display a small icon upon meeting a certain condition, for example if the element has different permissions then the list(broken inheritance) it displays an icon instead of the usual true/false(yes/no).

Does anyone know/have a usefull example or site I could look this info up?

share|improve this question

3 Answers 3

If I understood correctly, this post can help you.

share|improve this answer
    
Thank you very much, it looks really usefull :D –  iris Jul 3 '12 at 6:54

I think jQuery can help you in rendering this information. I have done it many times in SharePoint 2007 site. Just verify the class of the TD that loads the information.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script> 
$(document).ready(function(){

function dashboard()
{

//Display icons based on the status value.
$("td .ms-vb2:contains('Draft')").html("<img class='docStatus' src='/Style%20Library/Images/draft.png' id='docStatusDraft' alt='Draft'/>");

$("td .ms-vb2:contains('Detail')").html("<img class='docStatus' src='/Style%20Library/Images/detail.png' id='docStatusDetail' alt='Detail'/>");

$("td .ms-vb2:contains('Fixed')").html("<img class='docStatus' src='/Style%20Library/Images/fixed.png' id='docStatusFixed' alt='Fixed'/>");

}

dashboard();

}); 

</script> 
share|improve this answer
    
thank you, really appreciated, I'll give it a try :D –  iris Jul 4 '12 at 17:50

I wrote an article on our company blog about the various ways of achieving this. The Download option would probably best fit what you're looking for.

How to create a SharePoint KPI column

Free:

  • Javascript: Do the work on the client-side
  • Designer: Customise the list view using SharePoint Designer
  • Download: Download an open source Custom Field Type
  • Code: Create a custom field type from scratch

Not free:

  • Enterprise Edition: Use the Out of The Box Enterprise Edition functionality
  • Buy: Buy a pre-made Custom Field Type... We just so happen to sell one of these. :)

Links and more information on each of these options can be found in the article.

It sounds like you're going to have a bit of an uphill struggle with the broken permissions aspect: Our product (Highlighter) doesn't cover this functionality.

The property SPListItem.HasUniqueRoleAssignments will probably be of use to you.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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