title: PropertyGrid - Load dropdown values dynamically
body: <p>I've tried all sorts - lots of messing around with TypeConverters etc. So I won't cover all that here. </p>
  
  <p>So to reduce the question to its basics. Considering the below:</p>
  
  <pre><code>Imports LiteDB
  Imports System.ComponentModel
  
  Public Class mSystem
  
      &lt;CategoryAttribute("General"), ReadOnlyAttribute(True)&gt;
      Public Property ID As Integer
  
      Public Property ShortName As String = ""
  
      &lt;BsonRef("mSystemTypes")&gt;
      Public Property SystemType As mSystemType
  
  End Class
  
  Public Class mSystemType
  
      &lt;CategoryAttribute("General"), ReadOnlyAttribute(True)&gt;
      Public Property ID As Integer
  
      Public Property Name As String = "Default"
      Public Property Details As String = ""
  
  End Class
  </code></pre>
  
  <p>How do I get "SystemTypes" as a dropdown selector dynamically filled from a mSystemTypes collection? E.g. You select "Console" and it updates mSystem with the matching mSystemType.</p>
  
  <p>I am using LiteDb, which may make things a little more difficult, as it isn't purely an integer for the 'foreign key' as other scenarios may present, but a full object. </p>
  
  <p>I need to maintain the 'dbRef' approach to ensure integrity of data relationships. Just in case the DBLite thing throws in a curve ball, some code below demonstrating its use:</p>
  
  <pre><code>Public Class dbCollecitons
  
      Public mSystems As LiteCollection(Of mSystem)
      Public mSystemTypes As LiteCollection(Of mSystemType)
  
      Private Sub Examples()
  
          Dim col As LiteCollection(Of mSystemType) = dbCollections.mSystemTypes
          Dim value as String = "Console"
          Dim q = col.FindAll.Where(Function(x) x.Name = value).First
          Console.Writeline(q.ID)
  
      End Sub
  
  End Class
  </code></pre>
  
  <p>LiteDb.LiteCollection doesn't map directly onto ICollection (you use this in TypeConverter?), but I'm sure there's some work around. </p>