0

I am using SharePoint 2013 and had create a list view from one of my list. But I want to display only the columns with "Yes" value. If there is a column with "No" value, I would like to hide the entire column. I tried this but it doesn't workenter image description here and this is the result, it stills showing columns with "No" value enter image description here

Thanks

2 Answers 2

1

You can't disable showing columns OOTB. You need to use jquery to delete them. For example:

https://stackoverflow.com/questions/1068881/jquery-remove-html-table-column

https://stackoverflow.com/questions/1068881/jquery-remove-html-table-column

But, what will happen if you show two items and item1 has Yes and item2 has No? Feel free to ask and specify that definetely speak about columns and not rows

3
  • I will try that and see. My view will show only one row.
    – user32762
    Commented Aug 31, 2014 at 10:45
  • Are you sure multi- choises is not the right solution?
    – XristosK
    Commented Aug 31, 2014 at 10:50
  • Also, instead of deleting, you can point them out: $( "div:contains('Yes')" ).css( "text-decoration", "underline" );
    – XristosK
    Commented Aug 31, 2014 at 19:48
1

There is definitely no OOTB way of doing this. You have many options.

  1. As mentioned by XristosK, use JQuery to hide the column.
  2. Use a Content Query WebPart and customize the columns through the XSLT code used there. This will help you add conditions
  3. Use JavaScript CSOM and write a simple JQuery to display and you will have full control.

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.