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

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

  • I will try that and see. My view will show only one row. – user32762 Aug 31 '14 at 10:45
  • Are you sure multi- choises is not the right solution? – XristosK Aug 31 '14 at 10:50
  • Also, instead of deleting, you can point them out: $( "div:contains('Yes')" ).css( "text-decoration", "underline" ); – XristosK Aug 31 '14 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, privacy policy and cookie policy

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