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 have a list that I need to dynamically hide columns on based on user. Sort of a rudimentary Column Level security type deal. This is being done through Javascript and JQuery to simply not display certain columns when certain logic is met.

Here's the code I currently use to hide a column:

var index = $("tr.ms-viewheadertr th:contains('"+ colName +"')").first().index()+1;
$('th:nth-child('+index+'),td:nth-child('+index+')').hide();

This works perfectly for List views without grouping, but several of the views have multiple groupings and I can't figure out how to make it hide in those sub groups. Anyone know of a work around?

Thanks

share|improve this question
    
Did you resolve this? I am encountering the same issue. –  Aaronster Oct 25 '13 at 14:27
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.