Displaying a combobox list in a propertygrid

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
 
E

Eran Kampf

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
 
D

Dunja

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top