Displaying a combobox list in a propertygrid

  • Thread starter Thread starter Dunja
  • Start date Start date
D

Dunja

Hi All,

My UI has a PropertyGrid which displays the properties of
an item selected from a tree.
But I can't get it to display comboboxes with lists of
values that these properties could be changed to (these
lists would consist of values from various lookup tables).

Does anyone have an idea how this would work??
I found some help at

http://www.codeproject.com/cs/miscctrl/bending_property.asp

but this problem still sticks.

Thanks for any help,
Dunja
 
You need to implement a TypeConverter and override the
GetStandardValuesSupported method (it should return true) and
the GetStandardValues method which should return a collection of the
standard values you wish to support.

I hope this anwers your question...

Eran Kampf
http://www.ekampf.com
 
Thanks for your help!

Works great if I populate my values in the default
(parameterless) constructor.
Do you know if there's any other way (eg I would have
liked to set a property, so I could use a generic class
instead of having a separate converter for every lookup
table).

Thanks again for your help, any further input much
appreciated.
D.
 
Back
Top