1

I have created a document library programmatically using C#. Now, I want that when any particular document library created then its 'add document' button should not view or if possible then whole panel of add/edit/delete should be invisible. I am working on Office365 & sandbox solution.

enter image description here

2 Answers 2

1

You could hide a New button in List View using:

CSS

button.js-listview-qcbNewButton {
  display:none;
}

jQuery

$('button.js-listview-qcbNewButton').hide();

How to apply the changes:

  • Switch the page (AllItems.aspx) into edit mode
  • Add Script Editor or Content Editor web part into page.
  • For JavaScript code, put the specified code by wrapping it using script tag, for example: <script type="text/javascript">$('button.js-listview-qcbNewButton').hide();</script>
  • Save the page
0

whole panel of add/edit/delete should be invisible You have to create new form and add this CSS into its PlaceHolderMain section

$('.ms-dlgFrame').load(function () {
  $('.s4-pr.s4-ribbonrowhidetitle', frames[1].document).hide();
});

For more info refer to

http://geekswithblogs.net/venkatx5/archive/2010/11/17/how-to-hide-top-bar-ribbon-quick-launch-in-sharepoint.aspx

http://phinotworking.com/hiding-the-ribbon-when-using-sp-ui-modaldialog-showmodaldialog/

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.