The property grid insists on only using strings to identify which option is selected from a collection, and I need to allow the user to select from a list of strings, and have a GUID returned.
So, Icreated a UITypeEditor so that I could use a ListBox to select options in a PropertyGrid. That way I can fill the listbox with a collection of custom objects that contain a guid, and a string property that is tied to an overridden .ToString()
I figured out how to get my data into the propertygrid, but I can't figure out how to get the grid to select one of the items in the list in response to the values in the object that I attach the grid to.
I've tried doing the selection in the EditValue function, which is where the listbox gets populated, but It doesn't seem to do any good.
What exactly is the best way to handle a key/value collection in a property grid?
Thanks