Another PropertyGrid Question

J

JezB

The grid happily shows any public properties that has the Browsable
attribute set, but if I inherit public properties from some base class and
base my property grid on the new class, the property grid shows base class
properties but displays "Object reference not set to an instance of an
object" for them all - it only shows the additional public properties in my
new class correctly. Can anything be done about this ?
 
B

Bob Powell [MVP]

When you say "base my property grid on the new class" are you deriving a
property grid control from PropertyGrid?

Can you post an example of what you mean because the terms you are using are
not clear.

--
Bob Powell [MVP]
C#, System.Drawing

The November edition of Well Formed is now available.
Learn how to create Shell Extensions in managed code.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Read my Blog at http://bobpowelldotnet.blogspot.com
 
G

Guest

Do you call the base class' constructor also in your
derived class? If you don't probably many properties in
the base class are not initialized...
 
J

JezB

Yes that's exactly what I omitted - I thought it was a propblem with the
PropertyGrid rather than my own stupidity! - thanks.
 

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

Top