It's a simple question, but after hours of searching I've come up with
nothing! All I want to do is use the nice custom UI editor feature in
PropertyGrid when it isn't hosted in Visual Studio.
There are lots of examples out there showing how to get the
PropertyGrid to show your custom UI editor at design time, but if you
put a PropertyGrid control on your form and set SelectedObject at
runtime, the same custom editor doesn't show up.
I'd be very grateful for any help or sample code on this!
Daniel Gackle
p.s. sorry for the cross-post, but my post to windowsforms included a
quote from Shawn Burke that I now realize was answering a different
question. Also I hope there may be more PropertyGrid expertise here.
Daniel Gackle - 15 Oct 2004 18:14 GMT
Sqwawk! It does work. When you don't make stupid mistakes.
If anybody ever has this problem, make sure you don't do what I did:
propertyGrid1.SelectedObject = myCustomEditorObject;
when what you really mean is:
propertyGrid1.SelectedObject = objectWithSomePropertyOfMyCustomEditorType;