Groups | Blog | Home
all groups > dotnet windows forms designtime > october 2004 >

dotnet windows forms designtime : How can a PropertyGrid show a custom UI editor at runtime?


dont_spam_daniel NO[at]SPAM yahoo.com
10/14/2004 10:06:39 AM
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
dont_spam_daniel NO[at]SPAM yahoo.com
10/15/2004 10:14:10 AM
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:

AddThis Social Bookmark Button