Home All Groups Group Topic Archive Search About

PropertyGrid Control - Accessing Collections

Author
7 Feb 2006 9:15 AM
Mkenney
Hi,

I have been trying to use the property grid control as a means of editing an
object, one of the properties of the objet is a collection of another of my
classes. to create the collection i have inherited CollectionBase.

When the PropertyGrid is displayed the collection has the elipses as
expected, but when i click on this the pop-up editor any try to add a new
item to the collection the item is of type System.Object (with no properties)
rather than my own object?

Any help appriciated

Author
7 Feb 2006 11:43 AM
Ken Tucker [MVP]
Hi,

        You need to make a UITypeEditor for that.  Take a look at the
vbpowerpack for some examples.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/html/vbpowerpack.asp

Ken
---------------
Show quoteHide quote
"Mkenney" <mkenney@nomail.nomail> wrote in message
news:310C54FD-7FB0-4480-AAFE-F8DB8B64E438@microsoft.com...
> Hi,
>
> I have been trying to use the property grid control as a means of editing
> an
> object, one of the properties of the objet is a collection of another of
> my
> classes. to create the collection i have inherited CollectionBase.
>
> When the PropertyGrid is displayed the collection has the elipses as
> expected, but when i click on this the pop-up editor any try to add a new
> item to the collection the item is of type System.Object (with no
> properties)
> rather than my own object?
>
> Any help appriciated
>
>