if (myObject is IListSource) { // special case; obtain
list
myObject = ((IListSource)myObject).GetList();
}
if(myObject is IList) { // lists; show first item
myObject = ((IList)myObject)[0];
}
propertyGrid.SelectedObject = myObject;
Hi Marc,
Perfect, this is what I'm looking for... thanks.
This is different yes... I'm displaying an xml based file format that
cantains lots of steps and lots of subitems. When I click on a
collection in the propertygrid I have a custom editor that loads the
names of each item in the collection into a listBox and the
propertygrid is set the the first one.
Thanks everyone,
Jamie