Question : TypeConverter and multiple data sources used in Property Grid with a dropdown control.

I need to make multiple sources of data available via the property grid. I only have  two types of data; strings and ints. I use two TypeConverter classes to make data available in the property grid. Is there a way to make multiple sets of data available through these two classes? Otherwise, I will have to have a TypeConverter class for each set of data I need to access. I would like to avoid this if possible.

Answer : TypeConverter and multiple data sources used in Property Grid with a dropdown control.

If you have control over the different sets of data, you should make thme implement a common interface which the TypeConvertor classes can reference. The TypeConvertor classes would then reference the interface methods / properties and hence would be able to understand any data soruce which implemented the relevant interface.
Random Solutions  
 
programming4us programming4us