propertygrid adding two models in a form

57 Views Asked by At

I've a problem: I've an item which is called: ServerStatus This item i am adding with this.propertyGrid1.SelectedObject = item; to my propertygrid. But I've 2 WCF Services and wanna add to this propertygrid (=> in that my item is) an other modelitem (can't use +=);

is there a way to do this ? or do i need to make a model for both modelitems ?

1

There are 1 best solutions below

0
On

Not sure what your requirement is but a PropertyGrid is capable of displaying common properties for several instances. If you modify a property, the value will be assigned to all selected target instances. If a property has different values for the target instances, a blank field will be displayed.

myGrid.SelectedObjects = new object[] { item1, item2 };