title: How to limit a PropertyGrid collection to a List<T>
body: <p>Okay, I've read a couple of questions regarding the use of the PropertyGrid and collections. But, I'm having a difficult time understanding how/if <code>[TypeConverter]</code> will work for me. I've read the little blurb-age that MSDN puts out there, and frankly, it's a bit lacking to this poor, self-taught programmer.</p>
  
  <p>So, here is what I have. First a collection:</p>
  
  <pre><code>[Serializable]
  public List&lt;ModuleData&gt; Modules
  { get { return modules; } }
  
  private List&lt;ModuleData&gt; modules;
  </code></pre>
  
  <p>The object in the collection:</p>
  
  <pre><code>[Serializable]
  internal class ModuleData : IEquatable&lt;ModuleData&gt;
  {
      // simple data class with public properties
      // to display in the propgrid control
  }
  </code></pre>
  
  <p>I have a ListView control that contains items describing both ModuleData objects and BatchData objects. When I select a BatchData item from the ListView, the PropertyGrid, as expected, displays the collection editor. Is there a way to limit the collection editor to any ModuleData items listed in the ListView control only? Ideally I would not want a BatchData item (from the ListView) to be added to a BatchData collection - especially since the collection is not 'typed' for BatchData object types.</p>
  
  <p>If any further code samples are requested, I'll be more than happy to edit some snippets in.</p>
  
  <p>For clarity, ModuleData is a custom class that holds data required to instance a class within a specified assembly. All it contains are fields and public/internal properties. What I would like to do is use the collection editor assembled with the property grid control to add ModuleData objects to the BatchData <code>Module</code> collection. The ModuleData objects that are qualified to be added are listed in the ListView control.</p>
  
  <p>EDIT: Removed the <code>: List&lt;ModuleData&gt;</code> inheritance.</p>
  
  <p>UPDATE: If I am going to create a custom collection editor, does that mean I am building my own custom form/dialog? Then basically providing the propertygrid the information to display my custom collection dialog through attributes and inheritance of an UITypeEditor?</p>