I want to mimic the behaviour of the DataGrid designer in a custom control. Basically, if you drop a dataset on a form and then you drop a DataGrid, if you go to the DataSource property of the datagrid you will see that the combobox is already populated with the DataSet name. This means that the PropertyGrid looks at who is the parent of the Grid and then reads all it's components currently added to the container and selects only those that can be a source for the datagrid.

I tried doing something similar in a UITYpeEditor. Basically the function EditValue receives a contaxt as ITypeContextDescriptor and by reading the context.containter.components.items() I can access all the items contained. BUT, the only member I have for the items is Site and the site has a Name. So I can retrieve the names of all components contained but I don't know how to fir more information about them, like the type so I can select only those that I need... Does anybody have any idea about this? How can I use the Site to find what type are the components in a container?

Thank you!!
iulian