title: How to show Dropdown in a Propertygrid binding to Dictionary
body: <p>I want to show a drop-down of strings in a propertygrid for a selected value.
  In my current case, I have to bind a dictionary object to a property grid.</p>
  
  <p>If I am binding a class it is easy to do as below using a TypeConverter.</p>
  
  <pre><code>public class Employee
  {
      public string Name { get; set; }
      [TypeConverter(typeof(JobCategoryConverter))]
      public int? Category { get; set; }        
  }
  
  private void Form1_Load(object sender, EventArgs e)
  {
      Employee emp = new Employee() {Name = "Ray" ,Category = 1 };
      propertyGrid1.SelectedObject = emp;
  }
  </code></pre>
  
  <p>result look like this.</p>
  
  <p><a href="https://i.stack.imgur.com/6kjxd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6kjxd.png" alt="enter image description here"></a></p>
  
  <p>Any suggestion how I can show this dropdown if I bind to a dictionary? I used <a href="https://stackoverflow.com/a/1928595/1246550"><strong>this code</strong></a> to bind dictionary to propertygrid.</p>
  
  <p>So the code looks like,</p>
  
  <pre><code>private void Form1_Load(object sender, EventArgs e)
  {
      IDictionary dict = new Hashtable();
      dict["Name"] = "Ray";
      dict["Category"] = 1;
  
      DictionaryPropertyGridAdapter dpg = new     DictionaryPropertyGridAdapter(dict);
      propertyGrid1.SelectedObject = dpg;
  }
  </code></pre>