title: c# PropertyGrid restricting edits on List<T> items
body: <p>I have a app that makes use of the PropertyGrid in C#/.NET</p>
  
  <p>the <code>PropertGrid</code> holds onto the <code>MyAppObject</code> class/object shown below..</p>
  
  <pre><code>class MyAppObject
  {
      private List&lt;MyObject&gt; oItems;
  
      public List&lt;MyObject&gt; Items
      {
          get { return this.oItems; }
  
      }
  
  }
  </code></pre>
  
  <p>And so far it works well, nice and simple. I want the property grid to allow users to view the items, which it does well, however when you select the property in the PropertyGrid the dialog also allows to add more <code>List&lt;MyObject&gt; items</code>. </p>
  
  <p>I do not want this, I only want to have the ability to show the items, not edit them.</p>
  
  <p>I thought by not providing the setter (<code>set { this.oItems = value; }</code>):</p>
  
  <p><img src="https://i.stack.imgur.com/b6XUP.png" alt="like this"></p>
  
  <p>then it wouldnt allow the add button.</p>
  
  <p>Hope this makes sense, The screenshots shows the dialog, and I circled the buttons I want to remove.</p>
  
  <p>thanks</p>