Uh, I give up with this... Maybe somebody can help...

I have a custom control that has a property with a custom TypeEditor. When the user click he can choose between the options. I want these options to behave the same way the the datagrid behaves when dropped on a form: when you do that and you have some datasets added to the form the DataSource property gets as options in the combobox all the datasets and tables added to the form already. I want to do the same thing. The closest I got was this. In the EditValue function of the TypeEditor I do this:

Public Overloads Overrides Function EditValue(ByVal context As ITypeDescriptorContext, ByVal provider As IServiceProvider, ByVal value As Object) As Object

If (Not (context Is Nothing) And Not (context.Instance Is Nothing) And Not (provider Is Nothing)) Then

Dim f As Integer
For f = 0 To context.Container.Components.Count - 1
MsgBox(context.Container.Components.Item(f).Site.Name)
Next
....

This will list ALL components added including the form itself and the custom control itself. However, this only gives me the names of all the components. But I want to filter them and only display as options some of them depending on their type...

Exactly like DAtaGrid's DataSource property only shows as options DataSets and DataTables, I want to give my control's property only some components currently added to the same container based on their type...

Does anybody have any idea? How can I make the "link" having the component name and find it's type?

thank you,
iulian