Create a dropdown list of valid property values for a custom control

I've created a custom user control that has several properties. One specifies which database I want the control to access. I want to be able to present the user of the control a drop down from which he can select which database the control will interact with.

How do I get the dropdown to work? I can get default values, but have yet to figure out how to get the selectable list.

Any help is apprectiated.




You just need to attach your own TypeConverter to your property. You will override the GetStandardValuesSupported and GetStandardValues methods (maybe GetStandardValuesExclusive too) to return the list of databases you want to show.

If you are new to the PropertyGrid and the TypeConverter, here is a document.

Need Your Help

Abap: importing a generic table from a memory area - can/should it be done?

memory import export abap

I am exporting a dynamicaly created internal table to memory.

Div next to div

html css

I have two divs and i want div2 will be next to div1. I tried use float:left and display:inline but nothing help.