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


You could hide a New button in List View using:


button.js-listview-qcbNewButton {



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

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



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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