Using the PropertyGrid object to edit objects with child collections


Otis Mukinfus

I have a parent class that contains a collection of objects. The
parent class and the objects contained in the collection implement the
IEditableObject Interface.

When I load the parent class into a PropertyGrid I can edit it and
save all changes I make to the loaded object, except the changes I
make to the collection. The collection object field displays a
"browse" button when it is entered. If that button is clicked I get a
dialog box like the one that is displayed when adding parameters to an
OleDbCommand object. I can add a new child object and set it's
properties, but when I click the OK button on the dialog it does not
save the object I just set all the properties in.

Sorry That was so long winded, but I didn't know how else to explain
the issue.

How does one cause the data from this dialog to be saved? I've looked
at all of the properties and events provided by the PropertyGrid, but
can't find one that sounds as though it does this.

Can anyone shed any light on this?
Otis Mukinfus


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question